sLine has the contents of the file.
What i did in C Syntax is used the 'fscanf' function and converted the numbers to %f or %d, that way.
i've already read what i 'wanted' to read. In my file, certain numbers needed to be converted, for example, the 0001, in my preceeding post, needes to be a integer or 'single digit', which atoi does.
Therefore, the loop-- ( myNums < vLineList.size() WONT WORK! it truncates the 1!! )
1 2 3 4 5
|
for ( int myNums = 0; myNums < 1024; ++myNums )
{
if ( sLine[myNums] == ' ' )break;
}
|
So this loop nested in my while conditional to read the file, stops reading digits when it hits a space in the file and continues until EOF; as a result it stores those values into sLine.
So i've read what i 'wanted', now, parently, i need to use a character array to convert to ascii to integer. Which means reading the file differently.
I would reallly like to use this vLineList deal with the <vector> library.