Hi guys, I'm new here. I've started learning C++ few days ago, and I just cant solve this problem i have with winbgim.h. There is no way i can run any graphic program i make. Its always the same mistake with initgraph. Here is one example of my code... Code: #include <iostream> #include <cstdlib> #include <winbgim.h> #include <ctime> using namespace std; int main() { int x; int sx; int sy; int gdriver=6; int gmode=0; initgraph(&gdriver,&gmode,""); setbkcolor(WHITE); setcolor(BLACK); cleardevice(); srand(time(NULL)); rand(); for (x=1;x<60;x=x+1) { sx=(static_cast <float> (rand()))/RAND_MAX*640; sy=(static_cast <float> (rand()))/RAND_MAX*480; circle(sx,sy,30); } getch(); closegraph(); return 0; } I'm sorry for My english, and for stupid question. :cryin: Thanks in advance!
What exactly goes wrong? Does the code compile OK, or do you get any errors? If you get errors, what are they? If it compiles OK, what goes wrong at runtime? What are you expecting to see? What do you actually see? Also it would help if you give some idea of the operating system you're using and which compiler (include versions of both).