Why cant a member function that is declared as static also be declared as const?
Code:class C { static void f() const; // error };
Why cant a member function that is declared as static also be declared as const?
Code:class C { static void f() const; // error };
C Code. C Code Run. Run Code Run... Please!
"Love is like a blackhole, you fall into it... then you get ripped apart"
I believe that whenever you make a member function as const, that const actually is applied on the this pointer.
Since static member functions don't have the this pointer, they can't co-exist.
Note: I ain't sure.... just thinking
Have a wonderful day.... and keep smiling... you look terrific that way
signing off...
shiv... as i know him