Hey guys im having some trouble scanning in a few strings from a text file.
Here is a sample of the text file:
Command2 number2 number3
Command3 number4 number5
Here is my code for this part of the program
How do I make it skip to the next line when it reaches EOL.Code:fscanf(data,"%s%s%s",&inCommand, &inOperand1, &inOperand2); printf( "%s %s %s \n",inCommand, inOperand1, inOperand2);
So it scans in Command, number1 , and EOL on the first time around. And if the command has two numbers scan in both on the second time around.