468,758 Members | 2,082 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,758 developers. It's quick & easy.

c languge problem

hi iwould like to ask about how to use function ,pointers and graphics
in c languge easily

and thanks

Dec 8 '06 #1
3 2509
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
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
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.

Similar topics

3 posts views Thread by sharma | last post: by
reply views Thread by Bruce Davis | last post: by
117 posts views Thread by Peter Olcott | last post: by
28 posts views Thread by Jon Davis | last post: by
6 posts views Thread by Ammar | last post: by
2 posts views Thread by Mike Collins | last post: by
2 posts views Thread by =?Utf-8?B?TXVoYW1tYWQgQmlsYWw=?= | last post: by
reply views Thread by =?Utf-8?B?ODg5Mm1n?= | last post: by
reply views Thread by zhoujie | last post: by
reply views Thread by Marin | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.