How to get a C program to play a sound file?
<p>I have created the game snake in C that will run on Windows. I want to add sounds when the user hits certain keys or if the snake does certain things.</p>

<p>I know how to do this in C on MacOS but I don't know how to do it on Windows.</p>

<p>I tried to compile using a <code>playsound()</code> function I found on Google but I get an error message that indicates that playsound doesn't exist.</p>

<p>I tried to play the sound played by Windows when you type control G into run  but this led me down a horrible rabbit hole of never ending and not helpful code.  </p>

<p>I have no code to post at this time.</p>