Click here to Skip to main content
15,900,816 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: PLZ Help me :) Pin
Christian Graus6-Nov-02 23:31
protectorChristian Graus6-Nov-02 23:31 
GeneralRe: PLZ Help me :) Pin
benjymous7-Nov-02 0:13
benjymous7-Nov-02 0:13 
GeneralRe: PLZ Help me :) Pin
Roger Allen7-Nov-02 7:19
Roger Allen7-Nov-02 7:19 
GeneralCompletion Port and Multithreads :: MFC Pin
valikac6-Nov-02 18:40
valikac6-Nov-02 18:40 
GeneralRe: Completion Port and Multithreads :: MFC Pin
rrrado6-Nov-02 22:16
rrrado6-Nov-02 22:16 
GeneralRe: Completion Port and Multithreads :: MFC Pin
Daniel Lohmann6-Nov-02 22:52
Daniel Lohmann6-Nov-02 22:52 
GeneralRe: Completion Port and Multithreads :: MFC Pin
valikac7-Nov-02 10:00
valikac7-Nov-02 10:00 
GeneralDereferencing iterators Pin
daniel jurnove6-Nov-02 16:27
sussdaniel jurnove6-Nov-02 16:27 
I have a class ParticleExplosion which has a member function void update() :
class ParticleExplosion {
public:
        //lots of stuff deleted
	void update();
};


...and a vector of pointers to ParticleExplosion objects
vector< ParticleExplosion * > explosions;


Here, I the iterator I need, set it equal to the first item in the vector, then step through the vector, calling ParticleExplosion::update() every time...
std::vector< ParticleExplosion * >::iterator vItr;
vItr = explosions.begin();
while( vItr != explosions.end() )
{
	vItr->update();
	++vItr;
}


But, I get this error:

left of '->update' must point to class/struct/union

I've also tried this with:
*vItr->update();
**vItr->update();
*vItr.update();
**vItr.update();


...just in case *something* would work.

So, my question is: what is the correct to dereferencing the vector iterator correctly, so that I can access the object member functions?
GeneralRe: Dereferencing iterators Pin
Taka Muraoka6-Nov-02 16:54
Taka Muraoka6-Nov-02 16:54 
GeneralRe: Dereferencing iterators Pin
Christian Graus6-Nov-02 16:59
protectorChristian Graus6-Nov-02 16:59 
GeneralRe: Dereferencing iterators Pin
Anonymous6-Nov-02 16:59
Anonymous6-Nov-02 16:59 
GeneralThread & Message Parameters Pin
stevenson6-Nov-02 15:35
stevenson6-Nov-02 15:35 
GeneralThis works, but is it the right way to do it Pin
kjessee6-Nov-02 15:33
kjessee6-Nov-02 15:33 
GeneralRe: This works, but is it the right way to do it Pin
Christian Graus6-Nov-02 15:42
protectorChristian Graus6-Nov-02 15:42 
GeneralRe: This works, but is it the right way to do it Pin
kjessee6-Nov-02 15:56
kjessee6-Nov-02 15:56 
Generalsimple ATL-COM question. Pin
devvvy6-Nov-02 15:14
devvvy6-Nov-02 15:14 
GeneralRe: simple ATL-COM question. Pin
Christian Graus6-Nov-02 15:30
protectorChristian Graus6-Nov-02 15:30 
GeneralRe: simple ATL-COM question. Pin
Stefan Pedersen6-Nov-02 15:37
Stefan Pedersen6-Nov-02 15:37 
Generalkeep getting invalid progID Pin
devvvy6-Nov-02 15:57
devvvy6-Nov-02 15:57 
GeneralRe: keep getting invalid progID Pin
Stefan Pedersen6-Nov-02 16:12
Stefan Pedersen6-Nov-02 16:12 
Generalokay, now it's working, BUT.... Pin
devvvy6-Nov-02 17:55
devvvy6-Nov-02 17:55 
GeneralMSDev.exe crashing at startup Pin
Chris Meech6-Nov-02 14:31
Chris Meech6-Nov-02 14:31 
GeneralRe: MSDev.exe crashing at startup Pin
James Spibey7-Nov-02 0:20
James Spibey7-Nov-02 0:20 
GeneralRe: MSDev.exe crashing at startup Pin
Chris Meech7-Nov-02 2:43
Chris Meech7-Nov-02 2:43 
QuestionCan anyone see the problem in this code? Pin
Anonymous6-Nov-02 13:33
Anonymous6-Nov-02 13:33 

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.