有没有发挥系统提示音在Mac OS上的方法吗? [英] Is there a way to play a system beep on Mac OS?

查看:340
本文介绍了有没有发挥系统提示音在Mac OS上的方法吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有使用C ++和X code发挥系统提示音在Mac OS上的方法吗?我知道我需要使用图书馆。是否有跨Mac和Windows平台上工作的图书馆吗?

Is there a way to play a system beep on Mac OS using C++ and Xcode? I understand that I need to use a library. Is there a library that works across both the Mac and Windows platforms?

推荐答案

在跨平台的方式发挥蜂鸣声的std ::法院LT&;< \\ 007; 。我一直在试图通过传递一个字符,然后递减,直到7.没有工作,发挥它。明确输出code,虽然没有工作。

The cross platform way to play a beep is std::cout << "\007";. I had been trying to play it by passing in a char and then decrementing until 7. That didn't work. Explicitly outputting the code did work though.

这篇关于有没有发挥系统提示音在Mac OS上的方法吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆