[SDL] Re: SDL and std::vector not mixing well...

Nick Stovall nsto135 at aol.com
Mon Nov 7 14:29:33 PST 2005

Alex Volkov <avcp-sdlmail <at> usa.net> writes:

> My C++ might be a little rusty, but what exactly are you trying to do with
> class CBaseEngine
> { ....
> vector<int> m_vFrameTracker(1);
> .... }
> ?
> That would be the syntax for constructing a vector<int> with 1 element. You
> cannot construct anything within the class declaration. Instead, it should
> be declared as --
> 	vector<int> m_vFrameTracker;
> and constructed like so --
> CBaseEngine::CBaseEngine() : m_vFrameTracker(1) {}
> -Alex

I know that's not proper syntax, I was just testing that and it's what I
 ended up pasting. I've tried constructing it like you said, it still
 crashes on startup.

More information about the SDL mailing list