Hi all,
I am just trying to count the number of white spaces to the LEFT of a line from a text file. I have been using
count( line.begin(), line.end(), ' ' );
but obviously that includes ALL white spaces to the left, in between words and to the right. So basically what I'm wanting it to do is once it hits a non-space character stop it from counting the white spaces.
Thanks everyone.