Executing c graphics programs in Terminal
#include<iostream>
#include<graphics>
int main(void)
{
int gd = DETECT, gm;
initgraph(&gd, &gm, "");
line(0, 0, 100, 100);
closegraph();
}
the errors are as follows:
g++ hello.cpp -o hello
hello.cpp:2:19: error: graphics: No such file or directory
hello.cpp: In function 'int main()':
hello.cpp:5: error: 'DETECT' was not declared in this scope
hello.cpp:6: error: 'initgraph' was not declared in this scope
hello.cpp:7: error: 'line' was not declared in this scope
hello.cpp:8: error: 'closegraph' was not declared in this scope
kindly assist...
mb 062 13/2, Mac OS X (10.4.10), color-white