Reputation: 257
In the .h file:
class counting
{
public:
vector<int> vekto[2];
....
in .cpp
counting::counting()
{ int i;
for(i=0;i<2;i++)
vecto[i].resize(3);//line 6
}
get error:
.cpp(6) : error C2065: 'vecto' : undeclared identifier
.cpp(6) : error C2228: left of '.resize' must have class/struct/union
where is problem?
P.S. in cpp the .h file is included.
Upvotes: 0
Views: 318
Reputation: 20314
You declared your vector array as vekto
, but you are referring to it as vecto
. Change either of them so that they match.
Upvotes: 4