我知道你可以像这样注释掉整段代码:
/*
line of code
line of code
line of code
*/
但是,如果您尝试注释的代码中已经有 /* ... */ 部分,那么注释块的 */ 结尾将关闭我正在尝试创建的“更大”注释块。
例子:
/* wanting to comment this big section out
line of code
line of code
line of code
line of code
line of code
line of code
/* this section was already commented out before
line of code
line of code
line of code
*/ this section was already commented out before
line of code
line of code
line of code
line of code
line of code
*/ this last part doesn't get commented out, because the comment stops at previous */
显然这没什么大不了的,它并没有阻止我让应用程序正常工作,但我只是想知道是否有某种方式可以注释掉更大的代码部分,即使已经有注释该代码中的块。