I'm having a major brain fart here.
I am reading in a file from (programName) <input.txt.
And I am using fgets() to grab the each line and I'm dealing with each line.
There are some numbers on the line in the format of 01/01/2011,123.45,56.78,...,23.12
I am trying to grab those numbers (ie 123.45) and convert them into a regular number, atoi() farts out when it hits the . and spits back 123.
An suggestions, or a better way in doing it?
int main ()
while ( fgets(line, 256, stdin) != NULL )
//dealing with other lines prior to the lines with the data
void grabData(char *str)
char *delims = ",";
char *result = NULL;
result = strtok( str, delims );
//String format going in is in the form of
while ( result != NULL )
result = strtok(NULL, delims);//grabs the first price
//how to convert into a number??
//tried scanf() but either I'm not getting it or still confused :S
//Store the number into 'double stockTable[n][m]'
Thank You in advance!