I'm trying to make commandline mp3 player using libwmp3. I use codeblocks and have tried alot and I get error below. I have tried to include libwmp3.h, add libwmp3.a try changing compiler; but no success :(
Please help me to get through. I use the code for mp3 player posted at their site.
expected constructor or destructor or type conversion before "->" token .
I'm willing to bet that you copied the code from that site without adding the necessary scaffolding. For example, executable (as opposed to declarative) code needs to be wrapped in a function:
#include <windows.h> // Assuming this for Sleep
/* create class instance */
CWMp3* mp3 = CreateCWMp3();
/* open file from disk */
mp3->OpenFile("mysong.mp3",800, 0, 0);
/* ... wait here in some loop */
/* destroy class instance */