Sunday, August 2, 2009

What is the difference between a method an d function in c++?

the major difference between method and function is





Function have the return value.





In Method there is no return Value.

What is the difference between a method an d function in c++?
A procedure is a sequence of zero of more statements combined under one common name.





A function is a procedure that returns a value.





A method is a procedure or function that is part of a class; sometimes it's also referred to as member function. Which term is used depends largely on the programming language that the speaker is used to.





Note that lots of people, even the ones who are aware of the above distinctions, use the terms procedure and function interchangeably.


No comments:

Post a Comment