468,469 Members | 1,745 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,469 developers. It's quick & easy.

visual c++ 6 comment question

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.
Oct 13 '06 #1
4 2611
On Fri, 13 Oct 2006 16:04:41 +0800 in comp.lang.c++, "babyip" <babyip_at_hot_mail_dot_comwrote,
>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

Oct 13 '06 #2

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
*/

Oct 13 '06 #3
David Harmon wrote:
On Fri, 13 Oct 2006 16:04:41 +0800 in comp.lang.c++, "babyip" <babyip_at_hot_mail_dot_comwrote,
>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.
Oct 13 '06 #4
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
Oct 13 '06 #5

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

6 posts views Thread by frizzle | last post: by
1 post views Thread by Nogusta123 | last post: by
6 posts views Thread by Adrian | last post: by
11 posts views Thread by t | last post: by
13 posts views Thread by noagbodjivictor | last post: by
1 post views Thread by kmladenovski | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.