Self-study small white one, want to add a background music program, search on the net to insert music method, but using the absolute path, can play in your computer, send the entire folder to others, others open exe file, only the system error prompt
int main () { PlaySound (L "contributor \ \ monster. Wav", NULL, SND_FILENAME | SND_ASYNC | SND_LOOP); Init_card (); Display_card (); return 0; } Hope to have bosses can help me with the
CodePudding user response:
You are using a relative path
CodePudding user response:
You use now is relative path, but make sure the program folder inside the monster. Wav
CodePudding user response:
reference 1st floor Chen Zhongfu response: you are using a relative path such! But surprise me to send the entire folders (including audio files) to another computer, open exe file play has been a system of prompt TAT CodePudding user response:
refer to the second floor CHXCHXKKK response: you use now is relative path, but to ensure that the program folder contains the monster. Wav yes I put in the folder! I open on your computer can be normal play, but I send the entire folder to another computer, to open but only the computer has been in circulation system prompt CodePudding user response:
Try to see in a virtual machine simulated his environment, whether caused by different external environment, CodePudding user response:
reference 5 floor Chen Zhongfu reply: try in a virtual machine simulated his environment, look to whether different caused by the external environment, good thank you!