📄 c sound.txt
字号:
//Sound Demo
//By Nikhilio
//
#include <iostream>
#include <windows.h>
#include <mmsystem.h> //Windows multimedia stuff
#include <winbase.h> //defines sleep function
// If you get weird link errors, make sure that your compiler knows
// where to find winmm.lib
void main(void)
{
char filename[255]="baloney.wav"; //file must be in same directory as executeable
sndPlaySound(filename,SND_SYNC);
//using SND_ASYNC will cause program execution to continue
//using SND_SYNC will cause the program to halt execution until
//the sound is done playing
//using SND_LOOP will cause the sound to play over and over.
//SND_LOOP must be used with SND_SYNC like so,
//sndPlaySound(filename, SND_SYNC | SND_LOOP);;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -