Michael wrote:
What's the difference between method & funciton in class concept in
C++?
All named blocks of code - named with a linkable entry point like foo() -
are either functions, constructors, or destructors. (The Standard sez
constructors and destructors are not functions. They are blocks of code that
bind to object lifespans.)
A function inside a class is a member function.
When using OO design, we send "messages" to objects, and they respond with
"methods". These words are jargon and have no fixed meaning. Roughly, the
message is often the name of a member function, as invoked, such as
anObject.foo(). Then the method is the contents of Object::foo().
And sometimes we say "method" to mean a virtual member function. Yet again
nothing defines these words but their contexts.
--
Phlip
http://c2.com/cgi/wiki?ZeekLand <-- NOT a blog!!!