【发布时间】:2017-07-07 08:32:48
【问题描述】:
假设我有以下代码(在 C++ 中,但这可能对问题并不重要):
int main() {
....random code....
/*This is a comment*/
....random code....
return 0;
}
在 Eclipse 中,当我想通过在代码前后放置 /* 和 */ 来注释掉整个代码时,注释会被 */ 在“This is a comment”行的末尾缩短3,所以剩下的代码不加注释。
/* //<--overall comment starts here
int main() {
....random code....
/*This is a comment*/ //<--overall comment ends here
....random code....
return 0;
}
*/ //<--overall comment SHOULD end here
任何人都知道解决这个问题的方法,还是我只需要处理它或使用 // cmets...?
【问题讨论】:
标签: c++ eclipse comments block-comments