goto needs a label like in basic.
#include <iostream.h>
void main()
{
cout << "\ntest";
goto label2;
label1:
cout << "\nlabel 1";
goto end;
label2:
cout << "\nlabel 2";
goto label1;
end:
cout << "\ndone.";
}
gotoxy(y,x) sets the x,y coords in the display.
Borland
#include <stdio.h>
#include <conio.h>
void main()
{
gotoxy(5,12), printf("row 12, col 5");
}
or is it col 12, row 5 hmmm
VC old versions
#include <graph.h>
#include <stdio.h>
void main()
{
_settextposition(5,12), printf(" row 5, col 12");
}