Borland C++ da grafika
#include
#include
void main()
{
int d = DETECT, m;
initgraph(&d, &m, "c:\\borlandc\\bgi"); // agarda
borland C: da bo„lsa
... // grafik amallar
getch();
closegraph();
}
DEV C++ da grafikani sozlash
Dev-C++ da grafika bilan ishlash uchun quyidagi so‗zlashlarni bajarish
lozim:
graphics.h
va
libbgi.a
(biblioteka)
fayllarni
yuklab
oling
(acm.tuit.uz/forum).
1. graphics.h faylni C:\Dev-Cpp\include papkasiga nusxasini ko‗chiring.
2. libbgi.a faylni C:\Dev-Cpp\lib papkasiga nusxasini ko‗chiring.
Dev-C++ ni ishga tushiring va ToolsCompiler options menyusiga kiring.
Compiler bo‗limiga o‗ting va Add these commands to the linker command
line ga galochka qo‗ying va uning oynasiga quyidagi satrni yozing (4.1-rasm):
-lbgi -lgdi32 -lcomdlg32 -luuid -loleaut32 -lole32
4.1-rasm. Dev C++ da grafika bilan ishlash uchun sozlash.
60
Do'stlaringiz bilan baham: |