TO CLICKTEAM: Problem with rdPtr and ...
Hello Clickteam (and may other who can help me)
The hole subject is:
TO CLICKTEAM: Problem with rdPtr and tagRDATA structure .
I have a problem, im using a lib called ID3Lib (who can read mp3 id3 data) , but there seems to be a problem if i add my variable "ID3_Tag myTag" to tagRDATA structure; it crashing when i try to use a function: rdPtr->myTag.Link("filename.mp3") , that gets called when i do a "action" function.
But the thing is that it works perfectly without having the variable defined in tagRDATA structure (works with having it in top of Main.cpp).
Many Thanks!!
Re: TO CLICKTEAM: Problem with rdPtr and ...
If you want to access the object elsewhere, you could always try putting extern ID3_Tag myTag; in common.h, and then keep the ID3_Tag myTag; at the top of main.cpp.
Re: TO CLICKTEAM: Problem with rdPtr and ...
That is because the object isn't created in tagRDATA structure. Only its memory is created. So you need to have a pointer to the object in the tagRDATA structure and create it when when the frame starts and destroy it at the end of the frame..
Re: TO CLICKTEAM: Problem with rdPtr and ...
And what z33z said. rdPtr is not a C++ struct so the object's constructor/destructor will not be called.
Re: TO CLICKTEAM: Problem with rdPtr and ...
Ah, okay... well anyway, setting up in common.h with extern seems to work good; i'll report later....
Thanks! :)