hichkas1
چهارشنبه 20 خرداد 1388, 15:21 عصر
سلام
من یکی از برنامه های که سایت گذاشته بود برای تست قرار دادم در توربو سی خودم.
#include <graphics.h>
#include <stdlib.h>
#include <stdio.h>
#include <conio.h>
int main(void)
{
int gdriver = DETECT, gmode, errorcode;
int xmax, ymax;
initgraph(&gdriver, &gmode, "C:\TC\TC\BGI"");//***masire TC rooye computere shoma***, kheily mohem
setbkcolor(1);//range pas zamineh
setcolor(10); //range matn
xmax = getmaxx();
ymax = getmaxy();
line(0, 0, xmax, ymax); // tabee keshidane khat
setcolor(4);
rectangle(100,100,550,400);//tabee keshidane mostatil
setfillstyle(1,2); //olgooye por kardan
floodfill(101,101,4); //por kardane mostatil
setcolor(14);
settextstyle(8,0,5); //fonte matn
outtextxy(250,200,"Hello!"); //chape matn
getch();
closegraph();
return 0;
}
اما وقتی اجرا می کنم هیچی انجام نمیشه فقط میبینم نوشته
bgi error:graphics not initiliazed
مشکل از چیه؟
دوستان محبت کنند اگه برنامه توربو سی من مورد داره یه نسخه سالم که تابع گرافیکی روش کار کنه اپلود کنه
مرسی.
من یکی از برنامه های که سایت گذاشته بود برای تست قرار دادم در توربو سی خودم.
#include <graphics.h>
#include <stdlib.h>
#include <stdio.h>
#include <conio.h>
int main(void)
{
int gdriver = DETECT, gmode, errorcode;
int xmax, ymax;
initgraph(&gdriver, &gmode, "C:\TC\TC\BGI"");//***masire TC rooye computere shoma***, kheily mohem
setbkcolor(1);//range pas zamineh
setcolor(10); //range matn
xmax = getmaxx();
ymax = getmaxy();
line(0, 0, xmax, ymax); // tabee keshidane khat
setcolor(4);
rectangle(100,100,550,400);//tabee keshidane mostatil
setfillstyle(1,2); //olgooye por kardan
floodfill(101,101,4); //por kardane mostatil
setcolor(14);
settextstyle(8,0,5); //fonte matn
outtextxy(250,200,"Hello!"); //chape matn
getch();
closegraph();
return 0;
}
اما وقتی اجرا می کنم هیچی انجام نمیشه فقط میبینم نوشته
bgi error:graphics not initiliazed
مشکل از چیه؟
دوستان محبت کنند اگه برنامه توربو سی من مورد داره یه نسخه سالم که تابع گرافیکی روش کار کنه اپلود کنه
مرسی.