C++ 中的 beep() 函数 "was not declared in scope"
beep() function in C++ "was not declared in scope"
我正在尝试在 CDT 中使用 windows.h 的 C++ beep()
函数。但它不会编译并抛出此错误:
'beep' was not declared in this scope
Function 'beep' could not be
resolved
Here is the code:
/*
* blahblah.cpp
*
* Created on: Jan 28, 2016
*
*/
#include <iostream>
#include <windows.h>
using namespace std;
int main(){
beep(523, 500);
//cin.get();
return 0;
}
我在 64 位 Win7 机器上使用 MinGW
谢谢
The Beep
function 以大写 B
开头。 C++ 是一种 case-sensitive 语言。
我正在尝试在 CDT 中使用 windows.h 的 C++ beep()
函数。但它不会编译并抛出此错误:
'beep' was not declared in this scope
Function 'beep' could not be resolved Here is the code:
/*
* blahblah.cpp
*
* Created on: Jan 28, 2016
*
*/
#include <iostream>
#include <windows.h>
using namespace std;
int main(){
beep(523, 500);
//cin.get();
return 0;
}
我在 64 位 Win7 机器上使用 MinGW
谢谢
The Beep
function 以大写 B
开头。 C++ 是一种 case-sensitive 语言。