If you are using the main C++ distribution of wxWidgets, Feel free to ask any question related to wxWidgets development here. This means questions regarding to C++ and wxWidgets, not compile problems.
I'm trying to make the class "RunningText" a derived class from the class "Object". But somehow my code is wrong, I get different errors when I try different solutions. For example:
RunningText.cpp|9|error: expected identifier before 'public'|
RunningText.cpp|9|error: no matching function for call to 'Object::Object()'|
It's not wxObject, it's Object. "Object" is my own class and has nothing to do with any wxWidgets object. But maybe I misunderstand you. Did you call it wxObject because it's derived from wxPanel?
Well actually it's like this: I have a vector which stores objects (wxPanels). A "RunningText" is such an object, but there will be others like "Headline" or "DialogText" which differ a bit in their design. I don't want to write all that code for each object inside one class, so I thought it would be better to have like a "master class" called "Object" and then have these subclasses. Like this I won't have differently named objects (like RunningText or DialogText etc.) but only one that I can put inside an "ObjectList" vector. So maybe I need different constructors for my object with different parameters. But then I'll still have other classes for these subclasses with different header and .cpp files. I'm still in the process of designing my app and just "fiddling around" what might be the best way.
Thinking about it more, I don't actually really know what I want to do. Or at least I guess it won't work with derived classes. Somehow I thought I could like create an "Object" and pass a parameter that says what kind of object it has to be (RunningText, DialogText etc.). So in the end on the outside I'd only have an "Object" but inside it's something more specific. Or do I have to declare the derived classes directly inside the Object header file and can then create a separate .cpp file for these classes where I put the specific code?