So I'm working on a project and I'm trying to make a simple class which. for some reason, isn't being recognized by the compiler. Any time I declare an object of it in another file I get an "undeclared identifier" error.
I tried a fix explained in the article, putting a templated/typedefed forward declaration of class "Star" before my "Planet" class declaration. I put my star class in the same file as my planet class, and finally, I put the definition of the planet class in a separate file. All this seems to not have worked. Now I'm getting a "redefinition; different basic types" error at the top of my build log.
DO NOT edit this for the "thank you".
You WILL get hate. I hate it myself.
Just mark it as solved, there is a button for that if you really feel like - or just leave it as it is.
If you feel extra nice, point out how you did it, so that this post can become useful for future visitors.