Can't see "#include <vector>"???
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2

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

  1. #1
    Join Date
    Sep 2009
    Posts
    7

    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

    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 
    ................

  2. #2
    Join Date
    Oct 2002
    Location
    Austria
    Posts
    1,284

    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
  •  


Azure Activities Information Page

Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center