Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

STL problems....

Status
Not open for further replies.

Mindor

Programmer
Joined
Mar 20, 2000
Messages
1
Location
US
<br>
whenever I try to declare any STL objects I keep getting the same error messages....<br>
<br>
sampling of code.....<br>
...<br>
private:<br>
<br>
vector<RCard *> p_cards;<br>
int i_max_size;<br>
...<br>
RCard is a class representing a playing card<br>
<br>
the errors I recieve are as follows.....<br>
<br>
--- syntax error : missing ';' before '<'<br>
--- 'vector' : missing storage-class or type specifiers<br>
--- syntax error : '<'<br>
--- unexpected token(s) preceding ';' <br>
<br>
anyone able to lend me a clue?<br>
<br>
<br>
Mindor
 
You need to specify the type of vector (i.e. vector&lt;int&gt;, vector&lt;char&gt; ...). As you mentioned p_cards has type of RCard so what you need to do is define p_cards as:<br>
<br>
vector&lt;RCard&gt; p_cards;
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top