![Shailaja Tiwari](https://www.crazyengineers.com/img/avatar.jpg)
Member • Aug 28, 2013
Member • Aug 28, 2013
Member • Aug 28, 2013
Member • Aug 28, 2013
Member • Aug 29, 2013
Member • Aug 29, 2013
I tried it before but it again generates an error as "iostream.h header file not found".So this option doesn't work.Nayan GoenkaChange int main() to void main() and remove the return line.
You can try turbocppno chance I've already given up with that compiler .😡👎
Member • Aug 29, 2013
I don't think dev supports graphics.hshailaja revathiI tried it before but it again generates an error as "iostream.h header file not found".So this option doesn't work.
no chance I've already given up with that compiler .😡👎
Isn't there anything else that can be done.I've tried googling but seems of no help.
whereas the earlier header file that I had downloaded throws an error as sstream header file not found .😔
Member • Aug 29, 2013
I've already done that .Vishal0203I don't think dev supports graphics.h
however try Downloading the BGI library and try linking with your project.. that might give you some help!
Member • Aug 29, 2013
Member • Aug 30, 2013
Actually dev-cpp doesn't allow the use of <iostream.h>.It throws an error on using it as 'iostream.h' header file not found .And hence I cannot use void main() as it's not a good programming practice and also not supproted in dev-cpp and most standard versions(I'm using dev-cpp version 5.4.1).Nayan GoenkaWell it seems all the issues you are facing is basically due to the compiler fault. There is nothing you can do to fix it.
There is a error i just noticed in your code. As i said use the void main()
And correct the first line to.
#include<iostream.h>
Member • Aug 30, 2013
there is no relation between iostream header and error in declaration of main().shailaja revathiActually dev-cpp doesn't allow the use of <iostream.h>.It throws an error on using it as 'iostream.h' header file not found .And hence I cannot use void main() as it's not a good programming practice and also not supproted in dev-cpp and most standard versions(I'm using dev-cpp version 5.4.1).
And I'm googling for another compiler meant for graphics functions but you know it's difficult to decide which one would be best ,I'm mean I don't want some outdated old versions ,I wanna try new softwares .Well what is Cygwin ,I mean I know that it provides linux like environnemnt on windows system but is it efficient to be used and please do recommend if you know of some other compiler for Windows 7 32-bit .
Member • Aug 30, 2013
Member • Aug 30, 2013
Hi there😀! good to know u are not using turbo C compiler, but then why are u using old bgi library? I would recommend u to use Opengl in DevCpp.shailaja revathiI'm using Dev-cpp .Inorder to run graphics command in dev-cpp I included graphics package and bgi files in dev-cpp.But still I'm not able to run graphics command as it throws errors.
Member • Aug 30, 2013
Actually in Dev-cpp :Vishal0203there is no relation between iostream header and error in declaration of main().
Dev c++ take cares that you don't follow the wrong standards and hence it doesn't allow you to use void main() as it is a bad practice! Use int main() instead! there are reasons behind these things.
Member • Aug 30, 2013
Actually we have computer graphics practical in c and I don't get enough to learn from turbo-c dos-box in colg due to limited time .Previously I had been using dos-box but it didn't have full screen view and behaved erratically and it seemed a bit tedious to handle it.Nayan GoenkaYou seem more into C. Good luck in finding a good compiler. What are you trying to build with graphics btw?
[/is it only some testing and exploring or some serious development you are doing.QUOTE]no ,only testing and exploring .No opportunity, and time as well, to do some serious development.
Only testing and some explorations.
Member • Aug 30, 2013
Thanks for the link it solved some of my problems regarding sstream error.rahul69Hi there😀! good to know u are not using turbo C compiler, but then why are u using old bgi library? I would recommend u to use Opengl in DevCpp.
Or if u want to simply use windows and stuff, without drawing lines and rectangles stuff, u can try ur hands on Windows Programming, (It would be a little difficult but adventurous 😉).
Finally if u still direly wanna do using bgi here is a link I found <#-Link-Snipped-#> hope it helps.
If u want to try another compiler, u can try Visual C++ , its a bit heavier but worth's a shot.
Good Luck Programming!👍
Member • Aug 30, 2013
I researched on a few things. I think you should go with Code Blocks EP version which has winbgim inbuilt in it...shailaja revathiThanks for the link it solved some of my problems regarding sstream error.
Will try others also.😀
Member • Aug 30, 2013
#include <graphics.h> #include <conio.h> int gdriver = DETECT; int gmode; main() { struct fillsettingstype saveset; int pat, clr; initgraph(&gdriver,&gmode,""); for (pat = 1; pat < 12; pat++) { for (clr = 1; clr <16; clr++) { setfillstyle(pat,clr); pieslice(100,100,0,134,49); getch(); } } closegraph(); }
Member • Aug 30, 2013
Thanks downloading it now.Will try this too.Vishal0203I researched on a few things. I think you should go with Code Blocks EP version which has winbgim inbuilt in it...
I tested the code what you have written above!
works fine!
Member • Aug 30, 2013
If that's the case , here is an awesome solution to ur problem:shailaja revathiActually we have computer graphics practical in c and I don't get enough to learn from turbo-c dos-box in colg due to limited time .Previously I had been using dos-box but it didn't have full screen view and behaved erratically and it seemed a bit tedious to handle it.
Member • Aug 30, 2013
Is it a freeware?rahul69If that's the case , here is an awesome solution to ur problem:
#-Link-Snipped-#
Good Luck! 😀