prog.c:4:1: error: unknown type name ‘using’
using namespace std;
^~~~~
prog.c:4:17: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘std’
using namespace std;
^~~
prog.c:6:29: error: expected ‘;’, ‘,’ or ‘)’ before ‘&’ token
void move(int j, int h, int &x, int &y)
^
prog.c:19:60: error: expected ‘;’, ‘,’ or ‘)’ before ‘&’ token
void hilbert(int r, int d, int l, int u, int i, int h, int &x, int &y)
^
prog.c: In function ‘main’:
prog.c:39:2: error: ‘cout’ undeclared (first use in this function)
cout<<"Give the value of n\t";
^~~~
prog.c:39:2: note: each undeclared identifier is reported only once for each function it appears in
prog.c:40:2: error: ‘cin’ undeclared (first use in this function); did you mean ‘main’?
cin>>n;
^~~
main
prog.c:43:9: error: ‘DETECT’ undeclared (first use in this function)
int gd=DETECT, gm;
^~~~~~
prog.c:44:2: error: implicit declaration of function ‘initgraph’ [-Werror=implicit-function-declaration]
initgraph(&gd,&gm,NULL);
^~~~~~~~~
prog.c:45:2: error: implicit declaration of function ‘moveto’ [-Werror=implicit-function-declaration]
moveto(x,y);
^~~~~~
prog.c:46:2: error: implicit declaration of function ‘hilbert’ [-Werror=implicit-function-declaration]
hilbert(r,d,l,u,n,h,x,y);
^~~~~~~
prog.c:47:2: error: implicit declaration of function ‘getch’; did you mean ‘getc’? [-Werror=implicit-function-declaration]
getch();
^~~~~
getc
prog.c:48:2: error: implicit declaration of function ‘closegraph’ [-Werror=implicit-function-declaration]
closegraph();
^~~~~~~~~~
prog.c:36:12: error: unused variable ‘y1’ [-Werror=unused-variable]
int n, x1,y1;
^~
prog.c:36:9: error: unused variable ‘x1’ [-Werror=unused-variable]
int n, x1,y1;
^~
cc1: all warnings being treated as errors