This is my updated code. It still gives an error when I build and run: : |23|error: no match for 'operator[]' (operand types are 'std::vector<std::__cxx11::basic_string<char> >' and 'std::__cxx11::basic_string<char>')|
Well if your PlaySound has the Unicode interface (which the standard for Windows for at least the last decade), then you need to convert your ANSI std::string into something the Win32 UNICODE API understands.
> Can someone help me solve this?
...
> It still gives an error when I build and run
Then WHY didn't you say this in your first post!?!?
Well if your PlaySound has the Unicode interface (which the standard for Windows for at least the last decade), then you need to convert your ANSI std::string into something the Win32 UNICODE API understands.
It's not my PlaySound. That function is from the Windows API. You didn't know that?