Jun 02, 2016 Basic Graphic Programming in C. 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. Click OK and Compile and run the project and you’ll get this. Apr 30, 2013 Program compiles but won't Run? (Dev C) Sl1ck. Okay this is a first for me. My code compiles absolutely fine with no errors what so ever. But when I click 'Run' or 'Compile & Run', the little command window pops up but the output never appears? The command window tries to load the code for about 5 seconds and then it gives up, when usually it.
Mar 28, 2013 You may be wondering how to add graphics.h in dev C. Dev C does not support BGI Graphics we have to include graphics library manually. Here are few steps you must follow before using graphics.h header file.
I'm trying to use 'graphics.h' just for learning purpose. I'm trying to draw a line but 'Code Block 13.12' gives this error
'drawing operation was attempted when there was no current window'
http://postimg.org/image/hselc60ux/
Code I'm using:
#include<graphics.h>
int main()
{
line(0,0,640,480);
return 0;
}
As Code Block by default doesn't have 'graphics.h'. So, I followed One tutorial tom setup graphics.h in Code Block which has the following steps.
1. Download 'WinBGIm_Library6_0_Nov2005.rar' from http://winbgim.codecutter.org/
2. After extraction put 'graphics.h' & 'winbgim.h' in 'C:Program FilesCodeBlocksMinGWinclude' folder
3. 'libbgi.a' in 'C:Program FilesCodeBlocksMinGWlib' folder
4. Setting -> Compiler -> Global compiler setting
5.under 'Link Libraries' section add
'C:Program FilesCodeBlocksMinGWinclude'
6. under 'Other linker options' section add
-lbgi -lgdi32 -lcomdlg32 -luuid -loleaut32 -lole32
7. Open 'graphics.h' from 'C:Program FilesCodeBlocksMinGWinclude' in notepad and jump to line 302 and edit it to
int left=0, int top=0, int right=INT_MAX, int bottom=INT_MAX,
Please tell whats the problem
'drawing operation was attempted when there was no current window'
http://postimg.org/image/hselc60ux/
Code I'm using:
#include<graphics.h>
int main()
{
line(0,0,640,480);
return 0;
}
As Code Block by default doesn't have 'graphics.h'. So, I followed One tutorial tom setup graphics.h in Code Block which has the following steps.
1. Download 'WinBGIm_Library6_0_Nov2005.rar' from http://winbgim.codecutter.org/
2. After extraction put 'graphics.h' & 'winbgim.h' in 'C:Program FilesCodeBlocksMinGWinclude' folder
3. 'libbgi.a' in 'C:Program FilesCodeBlocksMinGWlib' folder
4. Setting -> Compiler -> Global compiler setting
5.under 'Link Libraries' section add
'C:Program FilesCodeBlocksMinGWinclude'
6. under 'Other linker options' section add
-lbgi -lgdi32 -lcomdlg32 -luuid -loleaut32 -lole32
7. Open 'graphics.h' from 'C:Program FilesCodeBlocksMinGWinclude' in notepad and jump to line 302 and edit it to
int left=0, int top=0, int right=INT_MAX, int bottom=INT_MAX,
Please tell whats the problem
Dev C++ Graphics Tutorial
How to run C++ program in Windows 7 32-bit?
Dev C++ Graphics Code
Graphics In Dev C++ Download
- In 7th step after tc it shows 'Failed to locate DPMI server'...Please help.. What to do next..??
- i tried to open another program using dosbox due to which my installed c language is dissapear now. how can i again open c???
- hi i have installed turbo c through dosbox but when i compiled my program it gives error i.e #include cannot be execute.. what can i do now??
- any one send me the link of turbo c++ 3.1 white screen version..
- how to open any cpp file which i have downloaded from mail
- how to open any cpp file which i have downloaded from mail
- I'm not sure what a cpp file is. Can you elaborate?In any case, I would recommend you to ask a new question. Please provide a thorough description of what you are trying to do, where this file is from, and where you downloaded it from.Thank you!
- I have installed DOSBox 7.4, created C file then compiled but not able to run program, the problem is .exe file not created, how to resolve the issue?
- having the same prob! tried several options, nothing concrete!
- How to do graphics program in window 7 environment???
- Abhisiktapatro,I'm afraid I do not understand your question. However, if you are able to describe in detail what you are trying to do or what your issue is, then I recommend you to ask a new question. This way your question will receive a great exposure as it will be featured on the frontpage of Answers.
- I face a problem exactly like Isita95 2010. I've got no ide what to do. Plz help!
- Fusiongemini,like Ishita above, I recommend you to ask a new question.
- i have installed dosbox and the c++ software is working up to the compilation part.but the output scren is not being displayed at all.neither by using the mouse to run the program...plz help me out
- Ishita,the question above is fairly old and unlikely to receive any attention other than from people searching for an answer like yourself. Unfortunately, I don't know the answer. Thus I recommend you to ask a new question. Dev c software free download for windows 7 64 bit.
- ishita first check whether u hav given the 'getch();' command at the end of the program or not if you hav given the command and still u dnt get the output window then just press Alt+F5 to display the output window
- thanks dude that worked for me!! (damn i was messing with this)
- i have installed the dosbox as u mentioned above..but after mounting drive ,i wrote command cd tc it works but cd bin did not.the message is display like'unable to chage to: bin'.So now what could i have to do???plz reply.
- Will this process also work in running Graphics program in WINDOWS 7 64bit version??
- i have installed the dosbox as mentioned above .. but i couldnt open the output window while running c program in tubo c .. wat may be the problem .. please do help
- After running the tc ++ using dosbox, i m getting an error that iostream.h file not found, cout not found.
- I use vmware and a copy of windows xp to run a virtual xp machine on my vista 64 machine. Compiling a 32 bit program be it vb, c++, c, assembly can be a real hassle on a 64 bit machine. Using Vmware will help, but I would suggest learning to use a new compiler that will work on a 64 bit machine and has a strong support group like eclipse.
- When you're done making a computer program using a particular language, don't be afraid to learn another.Learning how to impress a girl is a continuous process. Once you're familiar with one computer language, and you've already made a program using such, don't stop there. Instead, learn a second language and begin making another program using that language. You'll learn more if you'll choose a language that employs a completely different paradigm than the one you've previously used. Cooking dash download for pc.
- Just download Dev C++ for win 7 32 bit n open your file in it.
- Hi
1. Install the software DOSBox ver 0.73 : download here
http://www.bestsoftware4download.com/software/t-free-dosbox-download-rqeabjvs.html
2. Create a folder,for example „Turbo“ (c:Turbo)
3. Download and extract TC into the Turbo folder (c:Turbo): download here
http://s1.freedownloadme.info/turboc_installed.zip
4. Run the DOSBox 0.73 from the icon located on the desktop:
5. Type the following commands at the command prompt [Z]: mount d c:Turbo [The folder TC is present inside the folder Turbo]
Now you should get a message which says: Drive D is mounted as a local directory c:Turbo
6. Type d: to shift to d:
7. Next follow the commands below:cd tccd bintc or tc.exe [This starts you the Turbo C++ 3.0]
8. In the Turbo C++ goto Options>Directories> Change the source of TC to the source directory [D] ( i.e. virtual D: refers to original c:Turbo . So make the path change to something like D:TCinclude and D:TClib respectively )You can save yourself some time by having DOSBox automatically mount your folders and start TurboC++:For DOSBox versions older then 0.73 browse into program installation folder and open the dosbox.conf file in any text editor. For version 0.73 go to Start Menu and click on “Configuration” and then “Edit Configuration“. Then scroll down to the very end, and add the lines which you want to automatically execute when DOSBox starts.
Automatically mount and start Turbo C++3.0 in DOSBox ver 0.73:Those commands will be executed automatically when DOSBox starts!Please note:Full screen: Alt and EnterWhen you exit from the DosBox [precisely when u unmount the virtual drive where Turbo C++ 3.0 has been mounted] all the files you have saved or made changes in Turbo C++ 3.0 will be copied into the source directory(The directory which contains TC folder)Don’t use shortcut keys to perform operations in TC because they might be a shortcut key for DOSBOX also . Eg : Ctrl+F9 will exit DOSBOX rather running the code .TryTo use Turbo C++ IDE in windows 7 or in Vista; For those who wants to learn C/C++ just uninstall your 'Graphics driver '
For that Computers->properties->device manager->Display Adapters->graphics driver version u have uninstall that..And after log off Run your 'C:TCBINTC.exe'.it will open in full screen..Just Load the files in C:TC ( Hard disk c: drive)
It is the default location for TC.Enter these lines in the Dos Box options file. (Start menu – Dos box – Options – DOSBox 0.74 Options) That opens in notepad.Scroll down in the notepad file – After these lines“[autoexec]
# Lines in this section will be run at startup.
# You can put your MOUNT lines here.”
type as below :
——————mount c c:
c:
cd tc
cd bin
tc—————-
Alt + Enter for fullscreen, Alt + x to exit TC. Type exit to close Dos Box.Click on Run in the menu – Don’t use Ctrl + F9 to run program. (It will close Dos Box). All directories are set by default location.Software to run C programs on Windows 7
http://www.microsoft.com/express/Downloads/#2008-Visual-CPP
Copy the source code to Visual C++ ( Comes with Visual Studios 6.0 , 2005 , 2008 , 2010 etc. ) and compile .. The exe created would be compatible with your OS .Windows is not like linux which has C/C++ compiler provided with the OS. You need to get your own.Try Visual Studio Express. It's free, it's from MSFT and it's good. You'll be able to compile and create executable files.In the File menu, select Create a new project. Depending on what your CPP file is about, a Win 32 -> Console Application is the simpliest you can do.Add your CPP file and hit the build command. You'll probably have tweaking with include files to get it to compileInstall Dev C++
http://www.bloodshed.net/devcpp.html
or Code::Blocks
http://www.codeblocks.org/
both of which uses the MinGW 32-bit development environment environment for building applications.Both of these tools are a little bit old, and neither is great for developing Windows applications, but for learning C/C++ they should do just fine.- hi.. i have installed the software as u mentioned.. but i couldnt open the output window for turbo c.. please do help.. expecting ur reply
- if its aero problem then try using the files in this forum