Originally Posted by
EVOEx
Anyways, could you guys give a few examples of HOW you would comment functions? What format and what information would you write?
I use something along the lines of the .NET/Gtk+/Qt documentation style...
Like so:
Code:
/**
* Removes the specified item from the list if it exists.
*
* This function requires the value type to implement operator==().
*
* @param item the item to remove.
*
* @returns true if the item was removed, false otherwise.
*/
bool Remove(const T& item)
{
...
}
I also add @throws for the exceptions the method could throw if necessary.