Aight, for the past week or so, I've been working on a custom-algorithm generated line-drawer, and just now I'm starting on a header file with the functions to load algorithms from a text file.
For some odd reason, whenever I use fscanf or fgetc, all it does is return a random integer or letter.
Here's the code;
FILE *file = fopen( "used_alg.alg" , "r+" );
while ( a <= 3 ){
test = fgetc(file);
cout << xres[a] << endl;
++a;}
In which xres[] is an integer array of 4.
Any reason why it's not working? >_<