I have this string which contains numbers divided from one another with a /
, like this 24/2/13
. I want to save them individually in a vector of int,but it gives me this mistake expected unqualified-id before '.' token|
. I know it might be a stupid mistake but that's just the qay for now :). Here is the code:
int t;
string s;
for(int i=0;i<final_states.size();i++)
{
if(final_states.at(i)!='/')
s.push_back(final_states.at(i));
else
{
t=atoi(s.c_str());
temp_final_states.push_back(t);
s.clear();
}
}