|
|
CLetter125 q125;
OK assuming that CLetter125 is a valid classCLetter126 q126;
same..vector <CLetter *> qva_Fonts;
OK if you wrote #include <vector>
and using namespace std;
or using std::vector;
and CLetter is a valid class.qva_Fonts->push_back(q1);
Wrong. ->is used when you need a member/method of an object an you only have a pointer to it. Here you have a vector of pointers to objects, not a pointer to vector of objects.qva_Fonts.push_back(q1);
would be OK assuming that q1 is a pointer to a CLetter (or derived type) object.
vector <CLetter *> qva_Fonts;
it thinks qva_Fonts is an int.
|
|
I made the necessary changes |
vector<CLetter*> qva_Fonts;
(the word vector), I see the message "class std:: vector::<typename_Ty, typename_Ax>" |
vector<CDisplay *> qTile;
, I get "class std:: vector::<CDisplay *, std::allocator<CDisplay *>>" |
|
|
1>------ Build started: Project: Doctor game text, Configuration: Debug Win32 ------ 1>Compiling... 1>MakeFont.cpp 1>j:programmingintrogdoctor game textdoctor game textmakefont.h(1566) : error C2143: syntax error : missing ';' before '.' 1>j:programmingintrogdoctor game textdoctor game textmakefont.h(1566) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int 1>j:programmingintrogdoctor game textdoctor game textmakefont.h(1566) : error C2371: 'qva_Fonts' : redefinition; different basic types 1> j:programmingintrogdoctor game textdoctor game textmakefont.h(1564) : see declaration of 'qva_Fonts' 1>Generating Code... 1>Compiling... 1>main.cpp 1>j:programmingintrogdoctor game textdoctor game textmakefont.h(1566) : error C2143: syntax error : missing ';' before '.' 1>j:programmingintrogdoctor game textdoctor game textmakefont.h(1566) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int 1>j:programmingintrogdoctor game textdoctor game textmakefont.h(1566) : error C2371: 'qva_Fonts' : redefinition; different basic types 1> j:programmingintrogdoctor game textdoctor game textmakefont.h(1564) : see declaration of 'qva_Fonts' |
Cletter is a base class for all fonts, thus I have to use it as a pointer. |
|
|