Name: Anonymous 2009-08-29 8:56
I have a file in which ever line of text is terminated with a number. I'd like to extract the text and the number to variables, how do I do that?
int num = 0;
char c;
while((c = getchar()) >= '0' && c <= '9'){
num += (c - '0') * 10;
}