I declare this:
int xstartoftable;
void drawframe();
int main()
{
int xstartoftable = 80-TLENGTH;
drawframe();
return 0
}
void drawframe();
{
gotoXY(xstartoftable - 1, ystartoftable - 1);
}
The problem is that when I debug, the value of xstartoftable is random, not equal to the one in the main(). The code is over 150 lines, this is just the parts that are needed.
That’s because you redeclare your variable inside main.
Instead just do:
This is similar to:
On some compilers you might even get an error.