By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
457,695 Members | 1,317 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 457,695 IT Pros & Developers. It's quick & easy.

c languge problem

P: n/a
hi iwould like to ask about how to use function ,pointers and graphics
in c languge easily

and thanks

Dec 8 '06 #1
Share this Question
Share on Google+
3 Replies


P: n/a
new programmer wrote:
hi iwould like to ask about how to use function ,pointers and
graphics in c languge easily
You might want to consider posting to 'comp.lang.c' then.
Dec 8 '06 #2

P: n/a
new programmer wrote:
hi iwould like to ask about how to use function ,pointers and
graphics in c languge easily
As Victor said, the C newsgroup is comp.lang.c. However, graphics
capability is not part of the C language (or C++ either) and would be
off-topic there. You'll need to find a newsgroup dedicated to your
platform to select a graphics package.


Brian
Dec 8 '06 #3

P: n/a
to use graphics in c u need to use the header file GRAPHICS.H along
with the other header files. After u have included the header file u
need to initialize the graphics mode by calling initgraph(). this
function call requires (1) graphics mode , (2) Graphics Driver (use
DETECT macro if u do not know which driver u support) and (3) ABSOLUTE
location of bgi files.

#include <graphics.h>
#include <stdio.h>

void main()
{

int gd = DETECT, gm;

/* Initialize graphics mode by calling initgraph() */
initgraph(&gd, &gm, "c:\\tc\\bgi");
if (graphresult() != grOk)
{
printf("Error initializing the graphics mode");
}
else
{
/* start ur intended gaphics code*/
}
closegraph(); /* close the graphics mode*/
}

if the initilializationis succesful then you can use the various
functions already available (putpixel, circle, line, ellipse etc) for
doing the graphical operations u intend to do.
if u want u can study the link
http://www.developerfusion.co.uk/show/3653/10/ for details and other
options available.

-- Aachin

Dec 9 '06 #4

This discussion thread is closed

Replies have been disabled for this discussion.