Attalian
21/05/2007, 11:27
Merhabalar bu kodu DevCpp de çalıştırdım ancak Visual Studio da hata veriyor.
winmm.lib kütüphanesini de ekledim
//______________________________________________
#include <cstdio> // getchar()
#include <iostream>
#include <windows.h> // PlaySound()
#define SND_FILENAME 0x20000 // from mmsystem.h
#define SND_LOOP 8
#define SND_ASYNC 1
#define SND_ALIAS 0x10000
int main()
{
char sound[] = "C:/ohhnooo.wav";
PlaySound(sound,NULL,SND_FILENAME|SND_ASYNC);
getchar();
return 0;
}
//______________________________________________
HATA:
error C2664: 'PlaySoundW' : cannot convert parameter 1 from 'char [15]' to 'LPCWSTR'
Sizce sorun nedir? :/
winmm.lib kütüphanesini de ekledim
//______________________________________________
#include <cstdio> // getchar()
#include <iostream>
#include <windows.h> // PlaySound()
#define SND_FILENAME 0x20000 // from mmsystem.h
#define SND_LOOP 8
#define SND_ASYNC 1
#define SND_ALIAS 0x10000
int main()
{
char sound[] = "C:/ohhnooo.wav";
PlaySound(sound,NULL,SND_FILENAME|SND_ASYNC);
getchar();
return 0;
}
//______________________________________________
HATA:
error C2664: 'PlaySoundW' : cannot convert parameter 1 from 'char [15]' to 'LPCWSTR'
Sizce sorun nedir? :/