I have a .txt file and I need to take the 1st line and then take the first 16 characters of the third line as an integer.
Ex.
1st Joe::Employee Name
2nd 987654321:: SIN #
3rd 500.50:: Wage
After I print out the name, how would I skip and take only the 500.50 part of the 3rd line to use as float?
The distance from the start of the line to the '::' is always 16 characters if that helps.
Also would I be able to use
float wage
cin.getline(wage,16);
and then use it as a float?