如何使用 C++ 编写程序以在系统中显示蜂鸣音

how to write a program to display beep in a system using c++

本文关键字:系统 显示 C++ 何使用 程序      更新时间:2023-10-16

我是C++新手,我需要代码来运行和执行使用LCD printf函数的哔哔声程序

如何使用 C++ 编写程序以在系统中显示哔哔声

你可以这样尝试:0

cout << 'a';

或试试这个:-

#include <iostream> 
#include <windows.h> 
using namespace std;
int main() 
{ 
    Beep(200,1000);      
    cin.get(); 
    return 0; 
}

另请查看哔哔声功能

   std::cout << 'a';
   OR
   printf("a");