The purpose of this code is to let the user enter a name of a song into a string, which can then be buffered and played into a program called 'mplayer'.
I have just selected the bits relating to this code as the other code (switch statements) are not the problem.
int menu, option, playchoice; // for switch case- ignore this.
char song; // string for song name
scanf("%s", &song); // sets song name to 'song'
sprintf("buffer, system(%s)", song);
sprintf("buffer.mplayer %s", song);
This is for a program called 'mplayer'. There are no compiling errors. It just stops responding and Windows closes it. I am new to programming and have had difficulties getting this far.
Thanks for any help!