So, I came across an interesting method signature that I don't quite understand, it went along the lines of:
void Initialize(std::vector< std::string > & param1, class SomeClassName * p);
what I don't understand is the "class" keyword being used as the parameter, why is it there? Is it necessary to specify or it is purely superficial?
It is a forward declaration of the class. It is the effectively the same as
class SomeClassName;
void Initialize(std::vector< std::string > & param1, SomeClassName * p);
There are many situations in which a forward declaration is useful; there's a whole list of things that you can and can't do with a forward declaration in this answer to another question).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With