Skip to main content
gamedev.net
🔒 Locked

STL problems

Started by Mr Cucumber 3 replies 300+ views
Original Post
Mr Cucumber
Mr Cucumber
I am trying to implement an STL vector in my class like this: class Stream { private: vector v; This code generates this error in MS Visual Studio .NET: Syntax error: missing '';'' before ''<''. What is causing this?
Zipster
Zipster
Can we see the complete code? Or is that all you have? Because if it is, there are many things wrong with it you realize.
Mr Cucumber
Mr Cucumber
EDIT: Damn I cant use greater than and less than caharacters.
I try again:

I just showed the part that it was complaining about. The rest of the code worked fine before. I got the code down to this (still getting the error):

In my header:

#include <vector>


class Stream
{
private:
vector<char> v;
public:
};



In my .cpp file I just include this header and leave the rest of the file blank.
Just noticed I also got these two errors:
'Stream::vector': missing storage-class or type specifiers
Unexpected token(s) preceding ';'

[edited by - Mr Cucumber on July 20, 2003 4:00:17 AM]

[edited by - Mr Cucumber on July 20, 2003 4:01:03 AM]
Mr Cucumber
Mr Cucumber
It was the namespace part I forgot.
Like you can see in my edited post I realized I couldnt use greater than and less than characters.
Thanks anyway.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.