method and function c++ | Sololearn: Learn to code for FREE!
Новый курс! Каждый программист должен знать генеративный ИИ!
Попробуйте бесплатный урок
+ 6

method and function c++

what is the differences betwen method and function ?

8th Aug 2017, 8:17 AM
electron
electron - avatar
7 ответов
+ 3
As far as the C++ standard is concerned, there is no such thing as a "method". This terminology is used in other OO languages (e.g. Java) to refer to member functions of a class. Source: https://stackoverflow.com/questions/8596461/in-c-what-is-the-difference-between-a-method-and-a-function
5th Sep 2021, 3:30 PM
silentlearner
silentlearner - avatar
+ 23
Object functions are called Methods...
8th Aug 2017, 8:31 AM
Valen.H. ~
Valen.H. ~ - avatar
+ 4
I assume that methods exist only in class body and it does not return any values // hm... what more ?
8th Aug 2017, 8:22 AM
electron
electron - avatar
+ 3
It is not important whether the method/function has or has not return value.Important is only whether the method/function is belong the class or not.
8th Aug 2017, 10:36 AM
Highman
Highman - avatar
+ 2
Methods can return values ! Methods are functions like the others but, they are in a class.
8th Aug 2017, 9:49 AM
Jojo
0
what is the use of C++
8th Aug 2017, 3:16 PM
akab shaikh
0
My point of that so. 1. Function is set of statements where behavior based on the task is determined . 2. Method is the function, but determined in the field of class or structure.
31st Jan 2020, 7:02 AM
Renat Khasanov
Renat Khasanov - avatar