[英]Codeblocks comment out whole block
I am using a Codeblocks IDE for C++ and I tried googling it, but could not find the answer.我正在使用 C++ 的 Codeblocks IDE,我尝试在谷歌上搜索它,但找不到答案。
How do I comment out a block of code in Codeblocks?如何在 Codeblocks 中注释掉一段代码? For example in Eclipse its ctrl+7.
例如在 Eclipse 中它的 ctrl+7。
Ctrl + Shift + C to comment selected block Ctrl + Shift + C注释选定的块
Ctrl + Shift + X to uncomment . Ctrl + Shift + X取消注释。
一个快速的谷歌给了我 这个页面,它说它是 Ctrl + Shift + C。
You can do a box comment with /*
at the start and */
at the end.您可以在开头使用
/*
和在结尾使用*/
进行框注释。 It'll block out everything in between.它会挡住两者之间的一切。
ie IE
/*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.如果您只是突出显示要注释掉的代码,然后转到 Edit --> Box-Comment。 It'll do it all for you.
它会为你做这一切。
Shortcut to Comment highlighted code: Ctrl + Shift + C
注释高亮代码的快捷方式:
Ctrl + Shift + C
Shortcut to Uncomment highlighted code: Ctrl + Shift + X
取消注释高亮代码的快捷方式:
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
.之后,按
Ctrl + Shift + C
。
有各种各样的功能涉及那种事情,它们都在编辑菜单中
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.