0
C++ static function
As i know, in c++ we can call static function only this way: ClassName::FunctionName(); So why does this code work? https://code.sololearn.com/c1zFZSM0KxMg/?ref=app
3 Respostas
+ 2
is it something new?
+ 1
Static members and methods of a class are shared among all of it's instances.
Calling a static method using scope operator relieves you from instantiating an object of the class itself.
+ 1
Anna Simonyan no, I suppose not. Definitely, not a new feature from modern C++.