Question

im reading simple string from file but when i see in the variable value i keep see garbage how can i clean it ?

string line;
ifstream fp_in;  // declarations of streams fp_in and fp_out
fp_in.open("test.txt",std::ios_base::in);    // open the streams
if(fp_in.is_open())
{
    while ( !fp_in.eof() )
        {       
        getline (fp_in,line,'\n');
...
...

but in the begging of "line" string i see : ן»¿{"data":[{"id":"19513xxxx46141_326xxxx15447", ......
how can i get rid of it ?

Was it helpful?
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top