hello everyone,

i am trying to read a unformatted text file using ifstream.
i want to read the lines..i have done by using getline.
but my text file format looks like

firstname:abd lastname:cbd
user name is abd cbd
age is 45
height is 66cms

I was able to read line 1 and line 2 by taking there first word,,but having problem wid taking line 3 and line 4 first words..

How to i skip spaces before age and height??
please help me
Thanks in advance.

not sure what you mean.
cin<< should ignore spaces.
or you can call a space taker function which would look something like this

while (c!=' ')

that way it gets all the spaces away.
hope this helps