SoloCodigo
Programación General => C/C++ => C++ Builder => Mensaje iniciado por: ruben14 en Miércoles 24 de Noviembre de 2010, 07:37
-
Al poner
PlaySound(ExtractFilePath(Application->ExeName)+"\Sound\tap.mp3"),NULL,SND_RESOURCE || SND_ASYNC)
me da el siguiente error:
Cannot Convert 'AnsiString' to 'Const char *'
Alguna Idea
Gracias
-
PlaySound( (ExtractFilePath(Application->ExeName)+"\Sound\tap.mp3").c_str() ),NULL,SND_RESOURCE || SND_ASYNC)
-
Gracias por contestar...
Me sigue dando error ahora este:
Too Few parameter in call to '__stdcall PlaySound(const char*,void*,unsigned long)'
Gracias otra vez
-
Al responderte no me di cuenta de que te sobraba un paréntesis de cierre:
PlaySound( (ExtractFilePath(Application->ExeName)+"\Sound\tap.mp3").c_str() ),NULL,SND_RESOURCE || SND_ASYNC)
Sería así:
PlaySound( (ExtractFilePath(Application->ExeName)+"\Sound\tap.mp3").c_str(), NULL, SND_RESOURCE || SND_ASYNC)
-
Perfecto...
Muchas Gracias