程式碼:
#include <mmsystem.h>
int main(....)
{
PlaySound("聲音.wav",NULL, SND_ASYNC);
.....
.....
}
記得把聲音檔放入freeglut\bin
2.貝殼專案
記得改設定

程式碼:
#include <iostream>
#include <windows.h>
#include <mmsystem.h>
#include <stdio.h>
int main()
{
PlaySound("chaha.wav", NULL,SND_SYNC);
printf("Hello PleaseInput:");
int n;
scanf("%d", &n);
}
沒有留言:
張貼留言