944,074 Members | Top Members by Rank

Ad:
  • C++ Discussion Thread
  • Unsolved
  • Views: 422
  • C++ RSS
Nov 3rd, 2009
0

what is a header block of the fuction

Expand Post »
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?
Similar Threads
Reputation Points: 10
Solved Threads: 0
Junior Poster in Training
rookanga is offline Offline
60 posts
since Jun 2008
Nov 3rd, 2009
0
Re: what is a header block of the fuction
Click to Expand / Collapse  Quote originally posted by rookanga ...
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.:
c++ Syntax (Toggle Plain Text)
  1. int myFunction (double arg1, bool arg2 [, more args]) //<-- the function header
  2. {
  3. //pre: precondition1
  4. // precondition2
  5.  
  6. //post: result1
  7. // result2
  8.  
  9.  
  10. //...action statements...
  11. }

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.
Featured Poster
Reputation Points: 833
Solved Threads: 392
Posting Maven
Fbody is offline Offline
2,846 posts
since Oct 2009

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in C++ Forum Timeline: Creating a triangle in C++
Next Thread in C++ Forum Timeline: else if statement in for loops





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC