Well, to be honest I haven't used dev-c++ in a long time myself, but there are many people here who have who will hopefully chime in. I think you have to add the two cpp files to a project, then build the project.
Well, to be honest I haven't used dev-c++ in a long time myself, but there are many people here who have who will hopefully chime in. I think you have to add the two cpp files to a project, then build the project.
I haven't really used Dev-c++, but VS Express will handle all these details for you. It might be good for you since you don't seem to understand the process.
What you typically do is just add all your .cpp files to your project and then just build and everything is done for you.
I believe I did it... Well I thought so yesterday too, but I was wrong...
the code in post 3 has the correct division of definition and implementation files, just link them properly.
Last edited by m37h0d; 05-06-2008 at 08:25 AM.
On what arguments one should never use ' using namespace std; ' ? One argument to use it is that for VisualStudio6, and yes old compilers are still in use, some stuff had been declared in the global namespace.
So with explicitely specifying the namespace with the scope operator, this can cause errors.
I've only seen that in regards to C library names (e.g. rand(), strcmp, printf, etc) on VC++ 6.0. Explicitly stating the namespace works on that compiler on C++ library names (e.g. string, cout, vector, etc).
Besides, you really shouldn't worry about appeasing VC++ 6.0 in your current code. That compiler is too old to pay attention to.
My rule on using namespace std is to never use it and always use std::. The general rule is that you should never put a using namespace directive before other code that is included. That means don't put it in a header, because once the compiler sees it in your header it will do it for all source files that include that header and all other header files included after that header. Also you shouldn't put it before other headers in a source file for the same reason. I prefer not to have to remember all that and just use std:: everywhere.