你遇到过的源代码中最好的注释是什么?


当前回答

double t = 0.0; /* that's generally my opinion of the diner, too. */

其他回答

看这个:

'On Error Goto Hell.
//Not a bug, parameter position can change..., if you think this is wrong, you are in fact wrong.

在大学的一次家庭作业中,一位老师特别坚决地要求我们注释代码:

//I wonder if she actually reads these.

当作业被返回时,在注释“是的,我愿意”旁边用红笔写着

    /* Mark: If there's one thing you learn from this code, it is this...
   Never, ever fly Air France.  Their customer service is absolutely
   the worst.  I've never heard the words "That's not my problem" as 
   many times as I have from their staff -- It should, without doubt
   be their corporate motto if it isn't already.  Don't bother giving 
   them business because you're just a pain in their side and they
   will be sure to let you know the first time you speak to them.

   If you ever want to make me happy just tell me that you, too, will
   never fly Air France again either (in spite of their excellent
   cuisine). 

   Update by oej: The merger with KLM has transferred this
   behaviour to KLM as well. 
   Don't bother giving them business either...

   Only if you want to travel randomly without luggage, you
   might pick either of them.
   */
int MyFunction()
{
    // There once was a man named Dave
    int Result = 0;

    // Whose code just wouldn't behave
    MyObject *Ptr = new MyObject();

    // He left to go to a meetin'
    Result = Ptr->DoSomething();

    // And left his memory a leakin'
    return Result;
}

c++怎么样