Sound in console?

May 18, 2014 at 5:22pm
Can I play sound in console app? If yes, Can I repeat that sound till the program end?
May 18, 2014 at 6:29pm
closed account (z1CpDjzh)
Yes... Yes.... do you need code? but its platform specific so if ya need code you need to tell me your OS.
Last edited on May 18, 2014 at 6:29pm
May 18, 2014 at 6:53pm
Check out this link.Hope it helps you.
http://www.cplusplus.com/forum/beginner/4115/
May 19, 2014 at 2:36am
Thanks, guys. Especially Pterodactyl. I'm finally able to make it work.
By the way, I'm using Windows 7. It will be great if you guys can give me the source code for PlaySound function.
May 19, 2014 at 10:48am
You don't need source code for the PlaySound function if you are on Windows - just add the following line to the top of your file and off you go:
#include <Windows.h>
Topic archived. No new replies allowed.