You'd need a library that supports sound output.
You need to load the audio stream, and then play it.
Here's an example in SFML-2.0:
1 2 3 4 5 6 7 8 9 10
#include <SFML/Audio.hpp>
int main()
{
sf::Music fluttershy; // Since you wanted horse sounds.
fluttershy.openFromFile("squee.ogg");
fluttershy.play();
std::this_thread::sleep_for(std::chrono::seconds(3)); // Just wait for the sound to finish.
return 0;
}
Core C++ offers no such facilities, Beep is also not part of the core language.