Is this line in the collision tutorial wrong?
So there's a line in this tutorial that doesn't look right: https://docs.unrealengine.com/latest/INT/Programming/Tutorials/Components/5/index.html
Am I missing something? Or is this incorrect? Why is "class" there?
asked Oct 30 '15 at 02:32 PM in C++ Programming
This is correct but optional syntax. You could also write
However, putting class in front is not a syntax error. So to answer your question, no, this is not incorrect.
To be more precise, this is called an "elaborated type specifier", you can read about it here : http://en.cppreference.com/w/cpp/language/elaborated_type_specifier
Sometimes it will be necessary for disambiguation, but in your case, I don't think it is (but I would need to see the rest of the code to be sure).
Hope this helps,
answered Oct 30 '15 at 03:15 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here