Best practices: Where should function comments go in C/C++ code? -


So ... I think it can be subjective, but I have the opinion that what is the best practice for this is .

I have the following heading and The CPP file is:

Header:

  // foo.h square foo {public: int bar (int int); };  

CPP:

  // foo.cpp int foo :: bar (in int) {// here some algorithm Which gives revised values}  

Now to say that I have the comment of this function:

  / * Input: An algorithm integer as the input of the FU output: The result of algorithm fu on input in the comment: this function p = np * /  

resolves the function of the CPP file In the header above the declaration or function definition ? Thanks SO

I have described the comments in what is in the header and commented How does it in the CPP file.


Comments

Popular posts from this blog

c# - How to capture HTTP packet with SharpPcap -

jquery - SimpleModal Confirm fails to submit form -

php - Multiple Select with Explode: only returns the word "Array" -