[Dev-C++] Re:I need a basic [...] compiling classes
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: carlos D. M. <cg...@wo...> - 2001-12-05 18:35:01
|
Daniel Anderson escribió: > Hola, > I am trying to find out how to properly compile a program when there are > user-written classes involved. I have 3 files- a header file (dynarray.h), > an implementation file (dynarray.cpp), and my main program. Using Dev C++, > what is the proper method and order to correctly compile? This is my first > program where I have had to implement a class, and I can't find information > on how to use Dev C++ to do this. Thanks! > > Danny > > _______________________________________________ > Dev-cpp-users mailing list > Dev...@li... > https://lists.sourceforge.net/lists/listinfo/dev-cpp-users Include them in a project, that's all. And #include "file.h" in file.cpp, and #include "file.h" #include "file.cpp" in your main.cpp. But if that doesn't work (I think you ask because that doesn't work, but I say it, so if not, you know now), I imagine you would must write all the code in the same file... Well, but I am a so unexperienced about programming, perhaps there would be other solutions... Perhaps writing a makefile? (I have no idea about makefiles)... Or perhaps your copy of the program is a wrong one (perhaps it got downloaded badly) and you'll need download it again. (?) |