[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 122: include(/home/shoeb/public_html/www.matholympiad.org.bd/forum/includes/phpbb-latex.php) [function.include]: failed to open stream: No such file or directory
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 122: include() [function.include]: Failed opening '/home/shoeb/public_html/www.matholympiad.org.bd/forum/includes/phpbb-latex.php' for inclusion (include_path='.:/opt/php53/lib/php')
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 122: include(/home/shoeb/public_html/www.matholympiad.org.bd/forum/includes/phpbb-latex.php) [function.include]: failed to open stream: No such file or directory
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 122: include() [function.include]: Failed opening '/home/shoeb/public_html/www.matholympiad.org.bd/forum/includes/phpbb-latex.php' for inclusion (include_path='.:/opt/php53/lib/php')
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 122: include(/home/shoeb/public_html/www.matholympiad.org.bd/forum/includes/phpbb-latex.php) [function.include]: failed to open stream: No such file or directory
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 122: include() [function.include]: Failed opening '/home/shoeb/public_html/www.matholympiad.org.bd/forum/includes/phpbb-latex.php' for inclusion (include_path='.:/opt/php53/lib/php')
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 122: include(/home/shoeb/public_html/www.matholympiad.org.bd/forum/includes/phpbb-latex.php) [function.include]: failed to open stream: No such file or directory
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 122: include() [function.include]: Failed opening '/home/shoeb/public_html/www.matholympiad.org.bd/forum/includes/phpbb-latex.php' for inclusion (include_path='.:/opt/php53/lib/php')
[phpBB Debug] PHP Warning: in file [ROOT]/includes/session.php on line 1042: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3887)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4786: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3887)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4788: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3887)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4789: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3887)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4790: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3887)
BdMO Online Forum • View topic - Help:Graphics in C

Help:Graphics in C

Discuss Computer Science and Programming related problems

Moderators: bristy1588, Labib

Facebook Twitter

Help:Graphics in C

Post Number:#1  Unread postby rakeen » Fri Nov 23, 2012 12:01 pm

Code: Select all
#include<graphics.h>
#include<conio.h>
main()
{
   int gd = DETECT, gm;
   initgraph(&gd, &gm, "C:\\TC\\BGI");
   ellipse(100, 100, 0, 360, 50, 25);
   getch();
   closegraph();
   return 0;
}


Can anyone explain what are DETECT,gm,initgraph,closegraph?and what do they do?

Are libraries included in the IDE or the compiler?
If I compile a program having graphics library, then will the program run on(the exe file) another device without compiler?

What is that path(...TC\bgi) for?

How can I make menu(like the one we've in the top of our folder... file,tools,help) in C?
r@k€€/|/
User avatar
rakeen
 
Posts: 384
Joined: Thu Dec 09, 2010 5:21 pm
Location: Dhaka

Re: Help:Graphics in C

Post Number:#2  Unread postby leonardo shawon » Wed Apr 24, 2013 12:21 pm

initgraph function is used to initialize with the graphics library and changes to the graphics screen for drawing. It is the first step you need to do during graphics programming.
closegraph closegraph function closes the graphics mode, deallocates all memory allocated by graphics system and restores the screen to the mode it was in before you called initgraph.

check this link: same problem
http://www.programmingsimplified.com/c-graphics-programming-tutorial

What is that path(...TC\bgi) for?
>> I did not understand question.

If I compile a program having graphics library, then will the program run on(the exe file) another device without compiler?

You have to make it an .exe file. Most compiler have it. [ generally its like, make a project, write the code and then create a jar/exe file)

How can I make menu(like the one we've in the top of our folder... file,tools,help) in C?


You need to create a user interface. Some compiler like Netbeans provide drag and drop interface. You dont have to write a lot of codes and also you dont have to think about the position them. You just have to define how they are gonna react when they are being pressed/any action occurred.
What i told you is about Java. But I believe C also works in almost similar way.
Thank you.
Ibtehaz Shawon
BRAC University.

long way to go .....
User avatar
leonardo shawon
 
Posts: 169
Joined: Sat Jan 01, 2011 4:59 pm
Location: Dhaka

Re: Help:Graphics in C

Post Number:#3  Unread postby Phlembac Adib Hasan » Wed Apr 24, 2013 2:29 pm

graphic.h অনেক পুরান লাইব্রেরি। এইটা এখন অচল। বর্তমানে অনেক উন্নত লাইব্রেরী আছে। যেমন-SDL,Qt,OGRE ইত্যাদি। OGRE ব্যবহার করে নাকি 3D গ্রাফিক্স করা যায়! আমি এটা কখনো ব্যবহার করি নাই অবশ্য। SDL আমার কাছে অনেক ভালো লাগে। এক সপ্তাহ আগে আমি একটা অ্যালজেব্রাইক ক্যালকুলেটরের ডিজাইন করার সময় এইটা দিয়ে ইন্টারফেস বানাইসিলাম, চমৎকার কাজ করসিল।
Welcome to BdMO Online Forum. Check out Forum Guides & Rules: viewtopic.php?f=25&t=6
User avatar
Phlembac Adib Hasan
 
Posts: 1012
Joined: Tue Nov 22, 2011 7:49 pm
Location: 127.0.0.1


Share with your friends: Facebook Twitter

Return to Computer Science

Who is online

Users browsing this forum: No registered users and 1 guest