• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

C++ question

puffpio

Golden Member
I came apon some code that looks like this:

class MyClass {
....
};


void myFunc(const class MyClass & inVar) {
...
}


my question is...what is the significance of have the class keyword in the function declaration like that?
 
It's superfluous. void myFunc(const MyClass & inVar) should work just as well.

Perhaps the construct is a relic from C structs. Perhaps the coder thinks it's clearer somehow.
 
Back
Top