hmm, perhaps I need to see more into the code, I'm trying to replace a scanf("%c", &temp);
so basically skip the process of inputting that
and that is running on a loop, so is it possible to read the text file line by line? The char temp is moved to a more permanent storage in the loop.
I mean 1 line into the char temp per loop, but that seems otherwise perfect
And what if the file was only 1 character, would that be possible to read into the char temp?
for (int y = 0; y < 4; y++)
{
for (int x = 0; x < 4; x++)
{
char temp;
scanf("%c", &temp); //I want to automate this to read from a text file
puzzle[x][y].val[0]=temp;
puzzle[x][y].length=1;
puzzle[x][y].type=NORMAL;
}
}
Yeah, and I'm not sure at all how to do this
There is also alot of other code, but this is inside int main()
And also, this code isn't mine, I'm just trying to automate it
Okay, I got the redirected input to work, is it possible to run a batch file through a c++ program, and sorry for asking so many possibly silly questions