cplusplus
.com
TUTORIALS
REFERENCE
ARTICLES
FORUM
C++
Tutorials
Reference
Articles
Forum
Forum
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Lounge
Jobs
Forum
Beginners
im tired
im tired
Apr 6, 2011 at 12:59am UTC
cainen172
(151)
ok so im making a program and i want to put the classes in a seperate cpp file than the main program. is there a way to do that and get them to run together.
ps. i just couldnt think of a title
Last edited on
Apr 6, 2011 at 1:00am UTC
Apr 6, 2011 at 1:07am UTC
matsom
(288)
general rule:
1. header -class declaration
2. class.cpp -class definition, include #1 here
3. main.cpp -where main() is, include #1 here
in your IDE, create an empty project, add 1&2&3 to the project, done.
Apr 6, 2011 at 2:28am UTC
Disch
(13742)
ps. i just couldnt think of a title
Give me a break.
How about "how do I put classes in separate cpp files"?
http://cplusplus.com/forum/articles/40071/#msg216269
Apr 9, 2011 at 6:59pm UTC
cainen172
(151)
thanx next time ill just ask u fer a title :P
Topic archived. No new replies allowed.