{
cout <<" file found ..." << endl;
while((ch = infile.get()) !=' ' )
{
cout <<"\nRead value is : "<< ch<<endl;
cout << "calling function : ";
populateArray(ch, i);
}
}
file contents : if ( a + b ) ;
basically its taking the file pointer and taking a char, until it gets to a space. it works fine but is there anyway of telling it to carry on after the space? At the moment it gets if and then nothing else. I need it to stop at a whitespace put it into a buffer ( hence the function - for playing about with) then carrying on...
Any ideas?
cheers
John