Started working on a new class - other ones do not have this issue. I am getting the error “function already has a body” for ALL of the functions - and I have no idea why? I do have a public constructor, so other topics with a similar issue did not help.
Forgot to say - It doesnt seem to be anything INSIDE the function that is causing trouble - even when completely empty, I am getting this problem
Don’t look at the Errors window, use the Output window instead. It provides more information that is likely to be relevant to solving the error.
The only possibility that comes to mind based on what you’ve shared would be that in some other place you’re including the .cpp instead of the .h.
Otherwise share the actual text of the output, and not a cropped screenshot.
Ended up with this issue in another class yet again. This is what the output says:
And nope, there is no previous definition of any of those functions.
Class in question:
Apparently I have used include <classfilename.cpp> instead of include <classfilename.h> somewhere, which caused this issue. Very counter intuitive error message.
Yes, that is one of the causes of that error. C++ compile errors are meant to be pretty specific and usually have all the information that you need in the actual error text.
Unfortunately, including a cpp is not illegal. In fact, the Engine uses this to manage it’s unity build process. So there’s no way to generate what you would think would be the “intuitive” error message.