Classes in VC++
I am using Visual Studio C++, and i want to create an array of objects. I want to use a vector to store my objects. Firstly, I have created the following in my program, between the auto generated code:
class abc{ private: int var1; int var2; char var3; public: }; and now I want to create the vector by saying: voctor<abc> myVector(5); but the errors i get is: 1. syntax error: missing ';' before '<' 2. missing storage-class or type specifier. Can you help me please, I don't know VC++ that well, and I need to solve this problem. Thank You. |
Re: Classes in VC++
Quote:
#include <vector.h> std::vector<abc>myVector; you may have missed the namespace qualifier out. |
Or misspelled "vector"...
|
All times are GMT -5. The time now is 05:27 AM. |