By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
458,167 Members | 1,692 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 458,167 IT Pros & Developers. It's quick & easy.

visual c++ 6 comment question

P: n/a
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
Share this Question
Share on Google+
4 Replies


P: n/a
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

P: n/a

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

P: n/a
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

P: n/a
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.