P
p_adib
Well, I tried this test:
////// include_iostream.h START //////////
#include<iostream>
////// include_iostream.h END ////////////
////// including_twice.cpp START //////////
#include<iostream>
#include "include_iostream.h"
using namespace std;
int main()
{
cout << "Mainly worked" << endl;
return 0;
}
////// including_twice.cpp END //////////
And it worked with no errors or warnings. When is it the case that
lines that are in .h file cause conflicts with code lines in the .cpp
file that includes it?
////// include_iostream.h START //////////
#include<iostream>
////// include_iostream.h END ////////////
////// including_twice.cpp START //////////
#include<iostream>
#include "include_iostream.h"
using namespace std;
int main()
{
cout << "Mainly worked" << endl;
return 0;
}
////// including_twice.cpp END //////////
And it worked with no errors or warnings. When is it the case that
lines that are in .h file cause conflicts with code lines in the .cpp
file that includes it?