home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The C Users' Group Library 1994 August
/
wc-cdrom-cusersgrouplibrary-1994-08.iso
/
listings
/
v_10_06
/
1006036a
< prev
next >
Wrap
Text File
|
1991-08-24
|
621b
|
30 lines
#include <graphics.h>
#include <stdarg.h>
#include <stdio.h>
int gprintf(int x, int y, char *fmt, ...)
{
int len;
char buf[100];
va_list args;
va_start(args, fmt);
len = vsprintf(buf, fmt, args);
outtextxy(x, y, buf);
va_end(args);
return len;
}
void main()
{
int driver=DETECT, mode;
initgraph(&driver, &mode, "c:/tc/bgi");
gprintf(100, 200, "Driver=%d, Mode=%d.", driver, mode );
getch();
closegraph();
}