开发者

Codeblocks comment out whole block

开发者 https://www.devze.com 2023-02-16 07:01 出处:网络
I am using a Codeblocks IDE for C++ and I tried googling it, but could not find the answer. How do I comment out a block of code in Codeblocks?

I am using a Codeblocks IDE for C++ and I tried googling it, but could not find the answer.

How do I comment out a block of code in Codeblocks? For example in Eclipse 开发者_JAVA百科its ctrl+7.


Ctrl + Shift + C to comment selected block

Ctrl + Shift + X to uncomment .


A quick google gives me this page, which says it's Ctrl + Shift + C.


You can do a box comment with /* at the start and */ at the end. It'll block out everything in between.

i.e.

/*This is part of a block comment. 

This is still part of it

This also part of it */

If you just highlight the code you want to comment out and go to Edit --> Box-Comment. It'll do it all for you.


Shortcut to Comment highlighted code: Ctrl + Shift + C

Shortcut to Uncomment highlighted code: Ctrl + Shift + X

By the way, You can go with this link and you can search whatever shortcut you want in codeblocks.


First, select the code. After that, press Ctrl + Shift + C.


There are various functions involving that sort of thing, they're all in the Edit menu

0

精彩评论

暂无评论...
验证码 换一张
取 消