I am trying to do a multiple file program. I have class and function declarations in header files, and their corresponding definitions in .cpp source files. If I use the #include directive explicity for each filename, my project will compile just fine.
If you know Visual Studio 2005, you might be able to help with this, for this does NOT workCode:using namespace std; #include fraction.h #include func.h #include fraction.cpp #include func.cpp main() { //bla bla bla bla // }
Header Files
-fraction.h
-func.h
Reference Files
Source Files
-Program.cpp (main source file)
-fraction.cpp
-func.cpp
Yes, I did tell the compiler to look in the project directory for each of those files
in Tools-->Options-->Projects and Solutions-->VC++ Directiories. What else must I do to make the compiler accept these files? If I try to compile it the way shown just above here, I get a vomit of error messages.



LinkBack URL
About LinkBacks


