Click here to Skip to main content
16,005,209 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionFolder Copy Pin
Davitor1-Feb-09 17:30
Davitor1-Feb-09 17:30 
AnswerRe: Folder Copy Pin
«_Superman_»1-Feb-09 17:58
professional«_Superman_»1-Feb-09 17:58 
GeneralRe: Folder Copy Pin
Davitor1-Feb-09 18:09
Davitor1-Feb-09 18:09 
QuestionRe: Folder Copy Pin
David Crow2-Feb-09 5:52
David Crow2-Feb-09 5:52 
AnswerRe: Folder Copy Pin
«_Superman_»1-Feb-09 18:12
professional«_Superman_»1-Feb-09 18:12 
AnswerRe: Folder Copy Pin
ATM@CodeProject1-Feb-09 18:52
ATM@CodeProject1-Feb-09 18:52 
QuestionTemplate Class: Problem with Header file Pin
gvanto1-Feb-09 13:53
gvanto1-Feb-09 13:53 
AnswerRe: Template Class: Problem with Header file Pin
«_Superman_»1-Feb-09 17:20
professional«_Superman_»1-Feb-09 17:20 
When template classes are instantiated, a new class is created at compile time.

For example, GenArray<int, 10> intob; will create a new class.
Internally this class will have some mangled name (maybe .?AV?$GenArray@H$09@@)

And GenArray<double, 15> doubleob; will create another class (maybe .?AV?$GenArray@N$0P@@@)

So now you have 2 different classes.

In order to create a new class, the compiler needs the full information about the template class.

Since these classes are created when compiling the main function in the file TestDemo.cpp, the whole template information is necessary in the TestDemo.cpp file.

So you either put the whole template class in the GenArray.h file or include both GenArray.h and GenArray.cpp in TestDemo.cpp.

You will notice that template libraries like STL, ATL etc. have only .h files with all template class information in the header file iteself.

«_Superman_»

GeneralRe: Template Class: Problem with Header file Pin
gvanto1-Feb-09 17:52
gvanto1-Feb-09 17:52 
QuestionIs assignment to int atomic Pin
Dudi Avramov1-Feb-09 9:44
Dudi Avramov1-Feb-09 9:44 
AnswerRe: Is assignment to int atomic Pin
Alexander M.,1-Feb-09 9:49
Alexander M.,1-Feb-09 9:49 
QuestionRe: Is assignment to int atomic Pin
CPallini1-Feb-09 10:17
mveCPallini1-Feb-09 10:17 
AnswerRe: Is assignment to int atomic Pin
Joe Woodbury1-Feb-09 16:53
professionalJoe Woodbury1-Feb-09 16:53 
GeneralRe: Is assignment to int atomic Pin
Joe Woodbury1-Feb-09 16:52
professionalJoe Woodbury1-Feb-09 16:52 
AnswerRe: Is assignment to int atomic Pin
Randor 1-Feb-09 10:48
professional Randor 1-Feb-09 10:48 
GeneralRe: Is assignment to int atomic Pin
Dudi Avramov1-Feb-09 21:26
Dudi Avramov1-Feb-09 21:26 
GeneralRe: Is assignment to int atomic Pin
Stuart Dootson1-Feb-09 22:13
professionalStuart Dootson1-Feb-09 22:13 
Questiondecoding pdf format into device Pin
Horizzzon1-Feb-09 8:18
Horizzzon1-Feb-09 8:18 
AnswerRe: decoding pdf format into device Pin
CPallini1-Feb-09 10:23
mveCPallini1-Feb-09 10:23 
GeneralRe: decoding pdf format into device Pin
Horizzzon1-Feb-09 10:43
Horizzzon1-Feb-09 10:43 
QuestionStrncmp and GetwindowText problem Pin
keret1-Feb-09 6:18
keret1-Feb-09 6:18 
AnswerRe: Strncmp and GetwindowText problem Pin
Stephen Hewitt1-Feb-09 6:49
Stephen Hewitt1-Feb-09 6:49 
AnswerRe: Strncmp and GetwindowText problem Pin
Cedric Moonen1-Feb-09 7:31
Cedric Moonen1-Feb-09 7:31 
GeneralRe: Strncmp and GetwindowText problem Pin
keret1-Feb-09 8:38
keret1-Feb-09 8:38 
QuestionRe: Strncmp and GetwindowText problem Pin
David Crow2-Feb-09 5:55
David Crow2-Feb-09 5:55 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.