Building Project in VS.NET

GiLtY

Golden Member
Sep 10, 2000
1,487
1
0
my current dilemma is that I have 2 .cpps and a .h in my project, and one of the .cpps is a class implementation. Everytime I try to build the project the compiler complains at me about the class implementation. in my .h file I #include the .cpp, but didn't #include the header file in the .cpp because I'm using building a template class..... is there anyway to not compile the class implementation while building the project?

--GiLtY
 

CTho9305

Elite Member
Jul 26, 2000
9,214
1
81
you should #include the .h in the .cpp, but don't #include the .cpp anywhere - just add it to your project.

Also, regarding your sig, if you want people to use a new chat network, you should probably include your own screen name so that the newcomers have at least one person to talk to ;).
 

GiLtY

Golden Member
Sep 10, 2000
1,487
1
0
I tried that, but it gave me several errors... my professor told me that we gotta #include the .cpp because we are using templates for the class definition..

--GiLtY
 

CTho9305

Elite Member
Jul 26, 2000
9,214
1
81
Hmm, I don't recall having to do that when I used templates, but it has been a while.
 

GiLtY

Golden Member
Sep 10, 2000
1,487
1
0
I can send you the three files that I'm dealing with and you can try it out if you want.

--GiLtY
 

dighn

Lifer
Aug 12, 2001
22,820
4
81
did you seperate the template class into both a header and a cpp? if so there's really not much point. either put everything into the .h or inlcude both the .h and .cpp in the file you use the class
 

GiLtY

Golden Member
Sep 10, 2000
1,487
1
0
nevermind, after some snooping around I figured out that I only had to click on the properties of the class implementation file and make it excluded from build.

--GiLtY