J
JoeC
I am doing some routine code with dev C++ and I am getting an error
when I am trying to basic functions with a vector.
std::vector<nation>pl;
nation n1(red); <these are constructors.
nation n2(black);
int z = pl.size(); <--this works just.
pl.push_back(n1); <--get error here.
36 C:\Documents and Settings\Work\My Documents\C++\SBGIII\Main.cpp
expected constructor, destructor, or type conversion before '.' token
36 C:\Documents and Settings\Work\My Documents\C++\SBGIII\Main.cpp
expected `,' or `;' before '.' token
This does not make any sense, I use vectors all the time and why is
the compiler giving me problems?
when I am trying to basic functions with a vector.
std::vector<nation>pl;
nation n1(red); <these are constructors.
nation n2(black);
int z = pl.size(); <--this works just.
pl.push_back(n1); <--get error here.
36 C:\Documents and Settings\Work\My Documents\C++\SBGIII\Main.cpp
expected constructor, destructor, or type conversion before '.' token
36 C:\Documents and Settings\Work\My Documents\C++\SBGIII\Main.cpp
expected `,' or `;' before '.' token
This does not make any sense, I use vectors all the time and why is
the compiler giving me problems?