-
September 19th, 2009, 01:25 PM
#1
Can't see "#include <vector>"???
Below is the top most of my header file, am I using "#include <vector>' or vecotr<> x incorrectly? I get an error:
"error C2143: syntax error : missing ';' before '<'" at the line "vector<el_t> el;"
which leads me to think that my compiler is not recognizing vector even with the vector include line above. Visual Studio 2008
Code:
#include <vector>
typedef int el_t; // the el_t type is int for now
// el_t is unknown to the client
class stack
{
private: // to be hidden from the client
vector<el_t> el;
//el_t el[MAX]; // el is an array of el_t's --int's (original line)
int top; // top is index to the top of stack
void stackError(char*); // utility function for error handling
public: // prototypes to be used by the client
................
-
September 19th, 2009, 01:34 PM
#2
Re: Can't see "#include <vector>"???
Code:
std::vector<el_t> el;
Kurt
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|