I've had people tell me to not to include the .h in lines like #include <iostream.h> unless it's a custom header. How widespread of a convention is this?
Thanks,
farruinn
I've had people tell me to not to include the .h in lines like #include <iostream.h> unless it's a custom header. How widespread of a convention is this?
Thanks,
farruinn
Well really it depends on the compiler if you do that, but most people use it that way along with using namespace std;
So:
Code:#include <iostream> // Standard header #include "specailbrownies.h" // Custom Header using namespace std;
If you ever need a hug, just ask.
On almost all the compilers I have used you can use either.
I recomend the .h method just because I am a linux fan and am a C veteran
Asking the right question is sometimes more important than knowing the answer.
Please read the FAQ
C Reference Card (A MUST!)
Pointers and Memory
The Essentials
CString lib
"How widespread of a convention is this?"
It's my understanding that it's in the C++ standard, so that means it's a very widespread convention.
Also, some people have told me that
using namespace std;
is bad form. Instead they advocate doing it like this:
using std::cout;
using std::cin;
(I use the first method.)
Last edited by 7stud; 04-06-2003 at 01:12 AM.