Hi there,
I have a question about header files/source files in Visual C++ (I use visual c++ 2005 express).
I used to put all my code in one single .cpp file but now I have a test program (done by my tutor at Uni) which has 3 files: 2 .cpp (one has the main function, and the second one has got the functions implementations) and a .h file with the function headers only.
Now, I know that all these files need to be in the same folder for the program to work, which is quite easy to do in Unix using g++, but with Visual is another story.
What I usually do when I write a program is to start a new empty project (for now still a Win32 console application) so that in Visual, in solution explorer, I have in order:
Header files
Resource files
Source files
What I have done with the 3 files that I have, after starting a new project, was to add my .h file into the "header file" section (by right clicking on header files, add, new item) and the 2 .cpp files into the "source files" section (again by right clicking on header files, add, new item: done it twice, one for each .cpp file). I run the program and it works fine, but I wonder whether this is the right way to deal with programs with multiple files or not.
as usual, any suggestion is highly appreciated
thanks