Is this possible? If so, how?

I want to know how to write music in c++ to help write a program, where people type in a note name or something, and thye can compose a song.