my assignment says to "Finish the header block on the function.
" What is the header block? Is it the // (write information) or is it something else?
It's the very first line of the function. Some also consider the non-required pre:/post: statements to be part of it as well.
i.e.:
int myFunction (double arg1, bool arg2 [, more args]) //<-- the function header
{
//pre: precondition1
// precondition2
//post: result1
// result2
//...action statements...
}
Note, if you are going to use a prototype / declaration statement, it must match the header.
Last edited by Fbody; Nov 3rd, 2009 at 3:55 pm.
Reputation Points: 833
Solved Threads: 392
Posting Maven
Offline 2,846 posts
since Oct 2009