If you make GetAge() a 'constant' function -as you should- the contract also promises that GetAge() wont change the Cat on which it is called. Each function that you declare for your class must have a definition. The definition is also called the function implementation. Like other functions, the definition of a class method has a function header and a function body. The definition must be a file that the compiler can find. Must C++ compilers want that file to end in ".C" or ".CPP".
No comments:
Post a Comment