vc6.0怎么使用detectgraph()函数
#include "stdafx.h"#include "stdio.h"
#include "graphics.h"
#include "stdlib.h"
#include "conio.h"
int APIENTRY WinMain(HINSTANCE hInstance,
HINSTANCE hPrevInstance,
LPSTR lpCmdLine,
int nCmdShow)
{
int gdriver, gmode;
detectgraph(&gdriver, &gmode); /*自动测试硬件*/
printf("the graphics driver is %d, mode is %d\n",
gdriver,gmode); /*输出测试结果*/
getch();
initgraph(&gdriver, &gmode, "");
/* 根据测试结果初始化图形*/
bar3d(10, 10, 130, 250, 20, 1);
getch();
closegraph();
// TODO: Place code here.
return 0;
}
--------------------Configuration: 1111 - Win32 Debug--------------------
Compiling...
1111.cpp
C:\Program Files\Microsoft Visual Studio\MyProjects\1111\1111.cpp(17) : error C2065: 'detectgraph' : undeclared identifier
执行 cl.exe 时出错.
1111.exe - 1 error(s), 0 warning(s)
为什么未定义啊,怎么办