c languge problem

N

new programmer

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

and thanks
 
V

Victor Bazarov

new said:
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.
 
D

Default User

new said:
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
 
A

aachinchalana

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,009
Latest member
GidgetGamb

Latest Threads

Top