I came across some standalone code without headers. I believe it to be straight C/C++, but am not sure. If so, what does the “CLASS” in the following mean? I know it’s not a class declaration or definition. Is this a method of a class named “CLASS”?
void CLASS functionName(){
//
//
//
}
I’m used to seeing <returnType> <functionName>() {...}, but not the above. Am I forgetting something? (Pardon me, as I’ve been in JS and Objective-C lately.)
Although it’s not common AFAIK, it could be that CLASS is a macro as below. Since its name is
CLASS, I would say it’s more likely that it’s a macro for a class or namespace.1. Class Name
2. Namespace
3. Calling Convertion
4. Others
There could be others (e.g., a macro for a pointer) which are syntactically correct, but they’re less likely in your case. Or it could simply be a comment, as Hostile points out below.