Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C++ > visual c++ 6 comment question

Reply
Thread Tools

visual c++ 6 comment question

 
 
babyip
Guest
Posts: n/a
 
      10-13-2006
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.


 
Reply With Quote
 
 
 
 
David Harmon
Guest
Posts: n/a
 
      10-13-2006
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

 
Reply With Quote
 
 
 
 
Salt_Peter
Guest
Posts: n/a
 
      10-13-2006

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

 
Reply With Quote
 
Ron Natalie
Guest
Posts: n/a
 
      10-13-2006
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.
 
Reply With Quote
 
benben
Guest
Posts: n/a
 
      10-13-2006

> 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
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Sony R1 60mm photo question Nikon D70s comment. youlookhot@gmail.com Digital Photography 10 03-13-2006 06:27 AM
question about code comment Ethan Meyers C Programming 5 11-05-2005 03:50 PM
A small question about comment style Xiaoshen Li C Programming 18 11-05-2005 04:51 AM
? ELSE Conditional Comment / Using Conditional Comments Inside Other Tags To Comment Out Attributes Alec S. HTML 10 04-16-2005 02:21 AM
Trivial question - Visual C# .Net vs Visual Studio .Net John Timbers ASP .Net 32 11-08-2003 06:12 AM



Advertisments