Quantcast
Channel: static method or non-static method using static field - Stack Overflow
Browsing latest articles
Browse All 2 View Live

Answer by Sergey Kalinichenko for static method or non-static method using...

Methods that reference only static members should generally be defined static. This lets you access these methods without creating an instance of a class, and also access them from static context (e.g....

View Article



static method or non-static method using static field

I have a static const std::vector<SomeType> field in my class. I have two private methods that uses this field (searching methods). They do not use another members of my class. Should they be...

View Article
Browsing latest articles
Browse All 2 View Live


Latest Images