I have a text file that looks like the following:
12345678909876543211234567890
09876543122345678900
I will eventually need to add these two values together using separate stacks so I want to push each digit into a stack separately so I have code like the following:
test=fopen("test.txt","r");
while (!feof(fp)) {
fscanf(test, "%1d", &number);
Push((Item)number, &num1);
}
I need to modify my code though so that it reads the first line 1 digit at a time, pushing on each digit, and then for the next line I need it to push into another stack called num2
instead of num1
as you see in the current code.