Click here to Skip to main content
15,929,346 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: How to: GDI Flicker Free ?? Pin
Christian Graus6-Nov-02 22:24
protectorChristian Graus6-Nov-02 22:24 
AnswerRe: How to: GDI Flicker Free ?? Pin
KarstenK7-Nov-02 0:13
mveKarstenK7-Nov-02 0:13 
GeneralIE reuse Pin
rrrado6-Nov-02 22:10
rrrado6-Nov-02 22:10 
GeneralRe: IE reuse Pin
Stephane Rodriguez.6-Nov-02 23:03
Stephane Rodriguez.6-Nov-02 23:03 
GeneralRe: IE reuse Pin
rrrado7-Nov-02 2:29
rrrado7-Nov-02 2:29 
GeneralColor representation Pin
ISIS556-Nov-02 20:08
ISIS556-Nov-02 20:08 
GeneralRe: Color representation Pin
Stephane Rodriguez.6-Nov-02 20:45
Stephane Rodriguez.6-Nov-02 20:45 
GeneralRe: Color representation Pin
Christian Graus6-Nov-02 20:46
protectorChristian Graus6-Nov-02 20:46 
GeneralRe: Color representation Pin
ISIS556-Nov-02 21:04
ISIS556-Nov-02 21:04 
GeneralRe: Color representation Pin
Christian Graus6-Nov-02 21:07
protectorChristian Graus6-Nov-02 21:07 
GeneralPLZ Help me :) Pin
SUPER_PROG6-Nov-02 19:02
SUPER_PROG6-Nov-02 19:02 
GeneralRe: PLZ Help me :) Pin
Christian Graus6-Nov-02 19:28
protectorChristian Graus6-Nov-02 19:28 
GeneralRe: PLZ Help me :) Pin
Stephane Rodriguez.6-Nov-02 19:41
Stephane Rodriguez.6-Nov-02 19:41 
GeneralRe: PLZ Help me :) Pin
Christian Graus6-Nov-02 19:44
protectorChristian Graus6-Nov-02 19:44 
GeneralRe: PLZ Help me :) Pin
Stephane Rodriguez.6-Nov-02 19:51
Stephane Rodriguez.6-Nov-02 19:51 
GeneralRe: PLZ Help me :) Pin
benjymous6-Nov-02 23:21
benjymous6-Nov-02 23:21 
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 

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.