By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,988 Members | 1,068 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,988 IT Pros & Developers. It's quick & easy.

a problem with declaring a vector pointer

P: n/a
in myqtapp.h i have following declaration:
typedef std::vector <LCDRange *vecLCD;
vecLCD *vec;
and in myqtapp.cpp i have following implementation:
vec=new vecLCD;
vec.push_back(lcdRange);

but i am getting a compilation error
myqtapp.cpp:219: error: `push_back' has not been declared
myqtapp.cpp:219: error: request for member of non-aggregate type before
'(' token
Aug 14 '07 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Milan Krejci wrote:
in myqtapp.h i have following declaration:
typedef std::vector <LCDRange *vecLCD;
vecLCD *vec;
and in myqtapp.cpp i have following implementation:
vec=new vecLCD;
vec.push_back(lcdRange);
try:
vec->push_back(lcdRange);

.... you need to dereference the pointer vec.
Aug 14 '07 #2

This discussion thread is closed

Replies have been disabled for this discussion.