is it possible to cast a vector of strings to an integer?
I tried ...
the values in data are filled with values ... when I try this I get conversion errors when compiling. I've never tried to cast a vector, so, is it possible? if so, how can I do it? I appreciate any help.
I tried ...
Code:
vector<string> data; string values; ifstream in("pf.ppm"); ofstream out( "pf_sin.ppm"); while( in.good() ) { in >> values; data.push_back(values); } int row = (int)data[6]; int column = (int)data[7];
the values in data are filled with values ... when I try this I get conversion errors when compiling. I've never tried to cast a vector, so, is it possible? if so, how can I do it? I appreciate any help.
Comment