my .txt file contains information like
abc,bcd,10,20.
cde,efg,30.
hello,there,40
how can i read the last value, in this case 20,30 and 40 and it is between , and .
ifstream myfile;
myfile.open("myfile.txt");
string doctor;
for(int j=1;j<=5;j++)
{
for (int i = 1; i<=1; i++)
{
getline(myfile,doctor,'.');
}
cout<<doctor<<endl;
getline(myfile,doctor);
}
myfile.close();
here, i am getting the whole line