Hi.
int num = 0;
list<char>::iterator it;
for(it = binary.const_iterator; it !=binary.end(); ++it) {
if(*it == '1') {
abc.push_back(copyoflist.at(num));
}
num++;
}
Here binary is defined as list binary; copyoflist is a char type vector.
I am getting this error: invalid use of 'std::list >::const_iterator' on the line
for(it = binary.const_iterator; it !=binary.end(); ++it)
Am not able to figure out what is going wrong. Can someone help me out ?