struct __Garbage__MyStruct
{};
What is the purpose of this in c++?
It always occurs after the declaration.
struct MyStruct;
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
No, it’s not a keyword. Whatever code you are using is just defining a struct called
__Garbage__MyStructfor some purpose that I can’t make out from just the code you have here.That said, it is not a good idea to use names in C++ that contain two adjacent underscores.
These names are reserved by the implementation for whatever use they’d like (for example, their own internal macros and globals), so this results in undefined behavior. I’d strongly avoid code like this if at all possible.
Hope this helps!