I wrote a class in vs2008. I am creating a new project and I need to incoporate that class into it. How do I do that. I added the .h to the header section and the .cpp to the source file. In the new program i did #include "firstclass" but that did not work.
mrjoli021
-3
Junior Poster
Recommended Answers
Jump to PostWhat is the name of the header file? If it's firstclass.h, you need
#include "firstclass.h"
Jump to PostYou need only to include the header file and then create an instance of that class. If your class is called Foo, you would do:
Foo myClass;
myClass.(all the members should now be present) = blah;
Jump to PostI was trying to find an example of setting up a project for multiple source files in MSVC, ones that I'd posted a while back. I found this, this, and this, but it seems that my previously posted links to screenshots now show up only as thumbnails. …
All 10 Replies
codeaa
3
Junior Poster in Training
Nemoticchigga
0
Junior Poster in Training
mrjoli021
-3
Junior Poster
mrjoli021
-3
Junior Poster
Dave Sinkula
2,398
long time no c
Team Colleague
codeaa
3
Junior Poster in Training
mrjoli021
-3
Junior Poster
codeaa
3
Junior Poster in Training
Nemoticchigga
0
Junior Poster in Training
Nemoticchigga
0
Junior Poster in Training
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.