Wednesday, August 22, 2012

Graphics in C/C++ on Windows 7 using Dev-C++

, , , No comments

On the following I just want to show how to choose coordinate point to draw diagram.
If you are using Microsoft windows 7 operating system,Then Dev C++ is good for beginner
level, It fallow the same command as it is in Turbo C++,

First Download the Dev C++ and install it.
after installation download WinBGIm. and Install it.

Now open Dev C++

  • File>>New>>Project..>>WinBGIm>> WinBGIm>>Write Project Name



  • When you clicked on OK, there will open a file containing some pre-written code. Just Crt+A and press Delete.
  • Now your compiler is ready to compile graphics's Programs.



Basic Structure of A Graphics's Program in C/C++

#include<graphics.h>
...
...{you can add header files according to your needs}
...
int main ( )
     {
             int gd=DETECT,gm;
             intigraph(&gd,&gm,"c:/tc/bgi");
             //here will be your function
              getch();
              return 0;
     }



List of Basic Diagram

  • Arc
  • Bar
  • Bar3d
  • Circle
  • Line
  • Ellipse
  • Fillellipse
  • Rectangle
 

0 comments:

Post a Comment

Entries RSS Comments RSS

Sample Text

Pages


Copyright © Lovely Codes
Powered by Blogger
Distributed By Free Blogger Templates | Design by N.Design Studio
Blogger Theme by Lasantha - PremiumBloggerTemplates.com