CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums
Results 1 to 2 of 2

Thread: Can't see "#include <vector>"???

  1. #1
    Join Date
    Sep 2009

    Exclamation 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

    #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 

  2. #2
    Join Date
    Oct 2002

    Re: Can't see "#include <vector>"???

     std::vector<el_t> el;

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

Windows Mobile Development Center

Click Here to Expand Forum to Full Width

On-Demand Webinars (sponsored)