Multiples Files in VC++ 6
Hi there! I´ve got a very simple question. I want to compile a project in VC++ 6 that has three files: main.cpp (the main program), myclass.cpp (the implementation for the member functions of my class) and myclass.h (the declaration of the class). Hoy do I have to declare the class and the member functions in order to compile the project succesfully?
Thanks!
myclass.h: class declaration
myclass.cpp: class definition. Includes myclass.h
main.cpp: application definition. Includes myclass.h
Make sure both source files are explicitly part of the project (the header doesn''t matter as much, as it''ll be listed as a dependency). Presto, you''re done.
[ GDNet Start Here | GDNet FAQ | MS RTFM | STL | Google ]
Thanks to Kylotan for the idea!
myclass.cpp: class definition. Includes myclass.h
main.cpp: application definition. Includes myclass.h
Make sure both source files are explicitly part of the project (the header doesn''t matter as much, as it''ll be listed as a dependency). Presto, you''re done.
[ GDNet Start Here | GDNet FAQ | MS RTFM | STL | Google ]
Thanks to Kylotan for the idea!
quote:Original post by Oluseyi
myclass.h: class declaration
myclass.cpp: class definition. Includes myclass.h
main.cpp: application definition. Includes myclass.h
Make sure both source files are explicitly part of the project (the header doesn''t matter as much, as it''ll be listed as a dependency). Presto, you''re done.
[ GDNet Start Here | GDNet FAQ | MS RTFM | STL | Google ]
Thanks to Kylotan for the idea!
Do I have to declare the class as extern or static, or something like that?
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement