为什么提示这样的错误
#include <stdio.h>
#include <dos.h>
void main()
{
unsigned int freq; /* 指定的频率 */
do {
printf("Enter frequency: "); /* 显示键入频率的提示信息 */
scanf("%d",&freq); /* 接受键入的频率 */
if ( freq) { /* 频率不应为0 */
sound(freq); /* 开始发指定频率的声音 */
delay(1000); /* 延时一秒钟 */
nosound(); /* 关闭声音 */
}
} while ( freq ); /* 如指定的频率为0,则结束 */
}
F:\C++\sound\sound.cpp(12) : error C2065: 'sound' : undeclared identifier
F:\C++\sound\sound.cpp(13) : error C2065: 'delay' : undeclared identifier
F:\C++\sound\sound.cpp(14) : error C2065: 'nosound' : undeclared identifier
#include <dos.h>
void main()
{
unsigned int freq; /* 指定的频率 */
do {
printf("Enter frequency: "); /* 显示键入频率的提示信息 */
scanf("%d",&freq); /* 接受键入的频率 */
if ( freq) { /* 频率不应为0 */
sound(freq); /* 开始发指定频率的声音 */
delay(1000); /* 延时一秒钟 */
nosound(); /* 关闭声音 */
}
} while ( freq ); /* 如指定的频率为0,则结束 */
}
F:\C++\sound\sound.cpp(12) : error C2065: 'sound' : undeclared identifier
F:\C++\sound\sound.cpp(13) : error C2065: 'delay' : undeclared identifier
F:\C++\sound\sound.cpp(14) : error C2065: 'nosound' : undeclared identifier
...全文
相关推荐
为什么开机提示内存错误.docx
为什么开机提示内存错误.docx
为什么ASP中执行动态SQL总报错误信息?提示语句语法错误
为什么ASP中执行动态SQL总报错误信息?提示语句语法错误
网通光纤路由器怎么设置为什么提示帐户密码错误
设置好了PPPOE登陆,然后提示帐户密码错误,可是不用路由直接登陆客户端就能上网的,是不是这种接入方式的光纤不能用路由啊?下面有个不错的解决方法,遇到类似情况的朋友可以参考下
财付通为什么密码明明正确但输入老是提示错误?.docx
财付通为什么密码明明正确但输入老是提示错误?.docx
WebBrowser 完美屏蔽JAVA错误提示框
只需在使用WebBrowser控件前,加载NoJavaErr.dll就可完美屏蔽IE错误提示框。


新手乐园
