visual c++ 6 comment question

Discussion in 'C++' started by babyip, Oct 13, 2006.

  1. babyip

    babyip Guest

    Hello, does vc++ 6 provide a fastest way to comment multiple lines using a
    shortcut-key function?

    For example, in vs2005, I can comment multiple lines using CTRL+K+C
    shortcut-key, how can i do this in vc++6?

    Please advise.
    babyip, Oct 13, 2006
    #1
    1. Advertising

  2. babyip

    David Harmon Guest

    On Fri, 13 Oct 2006 16:04:41 +0800 in comp.lang.c++, "babyip" <babyip_at_hot_mail_dot_com> wrote,
    >Hello, does vc++ 6 provide a fastest way to comment multiple lines


    Multi-line comments are done by preceding them
    with /* and following with */

    Please read the welcome message posted twice per week in comp.lang.c++ under the subject "Welcome to comp.lang.c++! Read this first." or available at
    http://www.slack.net/~shiva/welcome.txt
    David Harmon, Oct 13, 2006
    #2
    1. Advertising

  3. babyip

    Salt_Peter Guest

    babyip wrote:
    > Hello, does vc++ 6 provide a fastest way to comment multiple lines using a
    > shortcut-key function?
    >
    > For example, in vs2005, I can comment multiple lines using CTRL+K+C
    > shortcut-key, how can i do this in vc++6?
    >
    > Please advise.



    What does the question have to do with C++?
    /*
    comment
    */
    Salt_Peter, Oct 13, 2006
    #3
  4. babyip

    Ron Natalie Guest

    David Harmon wrote:
    > On Fri, 13 Oct 2006 16:04:41 +0800 in comp.lang.c++, "babyip" <babyip_at_hot_mail_dot_com> wrote,
    >> Hello, does vc++ 6 provide a fastest way to comment multiple lines

    >
    > Multi-line comments are done by preceding them
    > with /* and following with */
    >
    > Please read the welcome message posted twice per week in comp.lang.c++ under the subject "Welcome to comp.lang.c++! Read this first." or available at
    > http://www.slack.net/~shiva/welcome.txt
    >


    The only problem is comments don't nest, so if there are comments int he
    code you are trying to disable, it won't work.


    Consider using
    #if 0

    #endif

    if you want to disable code.
    Ron Natalie, Oct 13, 2006
    #4
  5. babyip

    benben Guest


    > Multi-line comments are done by preceding them
    > with /* and following with */


    This may not work if the enclosed code has */ token. A more effective
    way to do it is through preprocessor macro:

    #if 0 // commenting out

    stuff I don't want...

    #endif

    Ben
    benben, Oct 13, 2006
    #5
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. John Timbers
    Replies:
    32
    Views:
    1,387
    Alvin Bruney
    Nov 8, 2003
  2. Alec S.
    Replies:
    10
    Views:
    10,084
    Alec S.
    Apr 16, 2005
  3. Xiaoshen Li

    A small question about comment style

    Xiaoshen Li, Nov 4, 2005, in forum: C Programming
    Replies:
    18
    Views:
    514
    Ben Pfaff
    Nov 5, 2005
  4. Ethan Meyers

    question about code comment

    Ethan Meyers, Nov 5, 2005, in forum: C Programming
    Replies:
    5
    Views:
    325
    Flash Gordon
    Nov 5, 2005
  5. Replies:
    15
    Views:
    700
Loading...

Share This Page