 |
C++Talk.NET C++ language newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
edu.mvk Guest
|
Posted: Wed Aug 02, 2006 9:10 am Post subject: Doubt on STL vector |
|
|
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
|
Posted: Wed Aug 02, 2006 9:10 am Post subject: Re: Doubt on STL vector |
|
|
"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 |
|
 |
Powered by phpBB © 2001, 2006 phpBB Group
|