Sunday, September 13, 2015

Graphic program to design calculator

In this program I used C graphics.
Not a big task, Only we need to know how to initialize Graphics then we can use inbuilt functions to design anything.
initgraph() is the function used to initialize graphics available in graphics.h library. It takes three parameter first one is reference to graphic driver, second one is reference to graphic mode and the last one is BGI library path.
Other functions I used are rectangle() to draw input box and buttons, line() for design, setcolor() to give color to shapes and outtextxy() to display text at specific x and y coordinates.

It looks like this :


  1. how to add grphics.h in my dev-c++

    1. Using WinBGIm library you can use graphics in dev C++ but I guess you will need to modify code accordingly because dev C++ does not support all libraries of traditional Trubo C++.

      Here is the link for WinBGIm Library setup:


Powered by Blogger.