In C there are functions only, In Java methodsonly (static methods as well), in C++ both.
1. In C language, you cannot compile a source-file if it has two (or more) functions with the same name. 2. You cannot link a program if it has two (or more) global (ie: non-static) functions with the same name.
Inline functions can be static. However, their usage outside of classes in C++ has been deprecated (a hangover from C). Static member functions are allowed of course, and they can be inline expanded where desired. In C, a static function simply has limited scope within the same translation unit. In C++, unnamed namespaces are the preferred method of achieving the same end.
Of course they are used. Both stand-alone and class-member functions are used in C++.
Yes you can overload the static method. But it should be avoided because memory to static methods are allocated at the time of class load.....so memory will be wasted if we don't use that methods. Whereas non-static method memory allocation depends on Object
In C there are functions only, In Java methodsonly (static methods as well), in C++ both.
type operator- ();
None of them. To control the formatting of your classes, you must overload the stream insertion and extraction operators.
Yes, there can be friend functions in C++.
1. In C language, you cannot compile a source-file if it has two (or more) functions with the same name. 2. You cannot link a program if it has two (or more) global (ie: non-static) functions with the same name.
your mom your mom
Inline functions can be static. However, their usage outside of classes in C++ has been deprecated (a hangover from C). Static member functions are allowed of course, and they can be inline expanded where desired. In C, a static function simply has limited scope within the same translation unit. In C++, unnamed namespaces are the preferred method of achieving the same end.
No, they are functions. Operators are -> or ++or /=
Of course they are used. Both stand-alone and class-member functions are used in C++.
Static binding occurs at compile time. Dynamic binding occurs at runtime.
In C++, methods are simply class member functions.
conditional operator , size of operator , membership operator and scope resulation operator can not be overload in c++