0

Hi guys!

Can anyone help me? Im a new to this site and C++ environment.
Im running a Microsoft Visual C++ express 2010 and I write a code in 3 separate files. 1 of them is a header file with an extention .h. and 2 of them are .cpp files. I have defined function prototype in the header file and its implementation in .cpp file. Then i execute this code in "int main" function which i have defined into the 3rd separate file. And while compiling it shows a linker error. i think the problem is the location of those many files. How shall i place those files to make the main program execute????
How can i link those files and where to execute the application

Thank you

4
Contributors
5
Replies
6
Views
7 Years
Discussion Span
Last Post by chiwawa10
0

unresolved external symbol "public: __thiscall GradeBook::GradeBook(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >)" (??0GradeBook@@QAE@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z) referenced in function _main

0

its an unsolved external complaining about one of the member functions in my .cpp file

0

Have you included the necessary header files (I presume the file in which GradeBook is defined) in the main cpp file?
Maybe you could post up some code for people to look at? It will make the analysis of your problem much easier

Edited by Valaraukar: n/a

0

Are you missing the include header directive in both of your CPP files? It looks something like this:

#include "GradeBook.h"
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.