Initgraph In Dev C%2b%2b
Introduction
So far we have been using C language for simple console output only. Most of us are unaware that using C++, low level graphics program can also be made. This means we can incorporate shapes,colors and designer fonts in our program. This article deals with the steps to enable the DevC++ compiler to generate graphics .
Configuring DevC++
- Initgraph In Dev C 2b 2b 1b
- Initgraph In Dev C 2b 2b 4
- Initgraph In Dev C 2b 2b 3
- Initgraph In Dev C 2b 2b 1
Standard C does not have any graphics support at all; it is a system-specific and/or library-specific function, so we'd have to know what you are programming for in order to help you. Finally, this is a message board, not IRC or Twitter. You can and should post full messages, not a succession of short one-line posts. A Computer Science portal for geeks. It contains well written, well thought and well explained computer science and programming articles, quizzes and practice/competitive programming/company interview Questions. Also see these Programs Write a program to draw a parabola in C using graphics. Kamal Subhani; Write a program to print any thing using graphics Kamal Subhani; Write a program to print rainbow using graphics Kamal Subhani. Graphics program of moving car in dev c; How to Change username in ubuntu 12.04; Install Oracle JRE 7 on Ubuntu; Django 1.4 for Ubuntu12.04; Using browser as an arithmetic calculator; What is sudo in Ubuntu? Creating A Terminal Window Clock; Blog Stats. sudo apt-get install build-essential sudo apt-get install libsdl-image1.2 libsdl-image1.2-dev guile-2.0 guile-2.0-dev libsdl1.2debian libart-2.0-dev libaudiofile-dev libesd0-dev libdirectfb-dev libdirectfb-extra libfreetype6-dev libxext-dev x11proto-xext-dev libfreetype6 libaa1 libaa1-dev libslang2-dev libasound2 libasound2-dev.
Before going into resolution, we must analyse the causes of this “Graphics not initialised error”. The probable causes are:. Wrong path to the BGI file. Unsupported Graphics Mode (DOS graphics apps will certainly not work in VISTA or above) Step.

Initgraph In Dev C 2b 2b 1b

- Step 1: Download the DevC++ version 5.11 from here.
- Step 2: Download the Graphics header files, and etc stuff needed from the given dropbox link.
- Step 3: Extract the contents of the rar file.
- Step 4: Go to the location where DevC++ is installed. For me its D drive. Go inside the MinGW64 folder. Copy the graphics.h and winbgim.h in the include folder and D:Dev-CppMinGW64x86_64-w64-mingw32include folder.
- Step 5:Copy the libbgi.a file into lib folder and in D:Dev-CppMinGW64x86_64-w64-mingw32lib folder.
- Step 6: Copy the ConsoleAppGraphics.template, ConsoleApp_cpp_graph.txt files and paste them inside the template folder of the devc++ installer location.
Now we are done with configuring of the DevC++ to support graphics programming. We shall write our very first graphics program now.
Running the first graphics program
Initgraph In Dev C 2b 2b 4

- Open DevC++. Click file ->New ->Project.
- Make sure you get the Console Graphics option. However, we are not going to click on it.
- Choose Empty Project option and Give a project name and make sure the selected language is C++.
- Copy the following code to the editor window.
- Go to “Project” menu and choose “Project Options” (or just press ALT+P).
- Go to the “Parameters” tab In the “Linker” field, enter the following text:
-lbgi
-lgdi32
-lcomdlg32
-luuid
-loleaut32
-lole32 - Click OK and Compile and run the project and you’ll get this output:
Program Explanation
Initgraph In Dev C 2b 2b 3
- The initgraph function- ?Initializes the graphics system.
- In C Program execution starts with main() similarly Graphics Environment Starts with this function.
- initgraph() initializes the graphics system by loading a graphics driver from disk (or validating a registered driver) then putting the system into graphics mode
Initgraph In Dev C 2b 2b 1
Please write comments if you find anything incorrect, or you want to share more information about the topic discussed above