Home > Back-end >  About easyx play music for help
About easyx play music for help

Time:11-28

compile failed, an error below





code is as follows:

# include & lt; Graphics. H>
# include & lt; Conio. H>
# include & lt; Windows. H>
# include & lt; Mmsystem. H>//MCI library header file

# pragma comment (lib, "winmm. Lib")

Int main ()

{
Initgraph (400, 500);

//the background picture
IMAGE img./img/statement
Loadimage (& amp; Img, _T (" 15. JPG "));
Putimage (0, 0, & amp; Img);//output images

//open the music
McISendString (" open 123. Mp3 alias up mymusic ", NULL, 0, NULL);

Outtextxy (0, 0, "press any key but play");
_getch ();

//play music
McISendString (" play up mymusic ", NULL, 0, NULL);

Outtextxy (0, 0, "press any key to stop play");
_getch ();

//stop playback and close the
McISendString (" stop up mymusic ", NULL, 0, NULL);
McISendString (" close up mymusic ", NULL, 0, NULL);

}

CodePudding user response:

All of the string to _T (" xx "),
Or L "XX",
Because the parameters required to LPCWSTR this W is wide character requirements,
  • Related