C++Talk.NET Forum Index C++Talk.NET
C++ language newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Doubt on STL vector

 
Post new topic   Reply to topic    C++Talk.NET Forum Index -> C++ language (comp.lang.c++)
View previous topic :: View next topic  
Author Message
edu.mvk
Guest





PostPosted: Wed Aug 02, 2006 9:10 am    Post subject: Doubt on STL vector Reply with quote



Hi

I am using a "vector" in my code and i added "#include <vector>" in my
header file.

my code has the declaration as:
***************************************
vector<Gerneric_Class*> var_name;
*****************************************
where Gerneric_Class is a userdefined class.

I am getting the error when i try compiling the code as:

Error:
**********************************************************
'vector' is used as a type, but is not defined as a type.
***********************************************************
why am i getting this error...? am i required to add any lib path for
the STL in my makefile....??

Thanks,
Back to top
John Carson
Guest





PostPosted: Wed Aug 02, 2006 9:10 am    Post subject: Re: Doubt on STL vector Reply with quote



"edu.mvk" <edu.mvk (AT) gmail (DOT) com> wrote in message
news:1154509422.619290.117300 (AT) i42g2000cwa (DOT) googlegroups.com
Quote:
Hi

I am using a "vector" in my code and i added "#include <vector>" in my
header file.

my code has the declaration as:
***************************************
vector<Gerneric_Class*> var_name;
*****************************************
where Gerneric_Class is a userdefined class.

I am getting the error when i try compiling the code as:

Error:
**********************************************************
'vector' is used as a type, but is not defined as a type.
***********************************************************
why am i getting this error...? am i required to add any lib path for
the STL in my makefile....??

try

std::vector<Gerneric_Class*> var_name;

Alternatively, after all your #includes, write:

using namespace std;

--
John Carson
Back to top
Post new topic   Reply to topic    C++Talk.NET Forum Index -> C++ language (comp.lang.c++) All times are GMT
Page 1 of 1

 
 


Powered by phpBB © 2001, 2006 phpBB Group