I am making a simple .wav file player, and I have a file system-like thing in a listbox. I want to detect if the selected file contains .wav:
I tried:
char wav is declared as ".wav";
if(!strcmp(szFile, wav))
{
PlaySound(szBuffer, NULL, SND_FILENAME | SND_ASYNC);
}
else
{
MessageBox(hwnd, "Must be valid .wav format!", "Error", MB_OK + MB_ICONINFORMATION);
}
but I get the error message under the "else" statement. How do I use strcmp to check the string?