OK....sigh...
I need to link to lwinmm to use playsound and stuff
Looked around and looked like I needed to do it like this:
I'm using Codeblocks
#include <iostream>
#include<windows.h>
#include <mmsystem.h>
#pragma comment (lib, "winmm.lib")
using namespace std;
int main()
{
PlaySound((LPCWSTR) "c:\\Snap ya fingers.wav", NULL, SND_FILENAME | SND_ASYNC);
cout << "Hello world!" << endl;
return 0;
}
But the errors I get are:
C:...\main.cpp|8|warning: ignoring #pragma comment |
C:...\main.cpp|15|error: cannot convert `const WCHAR*' to `const CHAR*' for argument `1' to `BOOL PlaySoundA(const CHAR*, HINSTANCE__*, DWORD)'|
||=== Build finished: 1 errors, 1 warnings ===|