Many people uses Turbo c++ to run c and c++ programs. More people want to do graphics programs.If they use windows 7 64 bit they may not be able to run Turbo c++. Dev C++ is more user friendly .Here you can see how to run graphics programs in Dev C++.
Steps
1: Download graphics.h
2:Download libbgia
Download this from here .
3:Copy the graphics.h file and go to the directory C\ Dev-Cpp\include
4:paste it
5:Copy libbgia and go to C\Dev-cpp\lib
6: paste it there
7:Open Dev Cpp
8: Go to file--> New--> project
9: Go to project menu ,select project options
10: Select parameters
11: Copy the following code in the Linker field.
Steps
1: Download graphics.h
2:Download libbgia
Download this from here .
3:Copy the graphics.h file and go to the directory C\ Dev-Cpp\include
4:paste it
5:Copy libbgia and go to C\Dev-cpp\lib
6: paste it there
7:Open Dev Cpp
8: Go to file--> New--> project
9: Go to project menu ,select project options
10: Select parameters
11: Copy the following code in the Linker field.
-lbgi -lgdi32 -lcomdlg32 -luuid -loleaut32 -lole32
11:Save this project file for future use else you should again copy the above code
in the linker field.
Sample C program to draw a circle#include<stdio.h> #include<graphics.h> int main() { initwindow(400, 300, "First Sample"); circle(150,150,50); getch(); }Note : You can download Dev-C++ from here

0 comments:
Post a Comment