编译器警告(等级 1)C4138
在注释外找到“*/”
结束注释分隔符前面没有开始注释分隔符。 编译器将假定星号 (*) 和正斜杠 (/) 之间留有一个空格。
示例
// C4138a.cpp
// compile with: /W1
int */*comment*/ptr; // C4138 Ambiguous first delimiter causes warning
int main()
{
}
此警告可由嵌套注释引起。
如果注释掉包含注释的代码段,在 #if / #endif 块中包含代码,并将控制表达式设置为零,可能会解决此警告:
// C4138b.cpp
// compile with: /W1
#if 0
int my_variable; /* Declaration currently not needed */
#endif
int main()
{
}
反馈
https://aka.ms/ContentUserFeedback。
即将发布:在整个 2024 年,我们将逐步淘汰作为内容反馈机制的“GitHub 问题”,并将其取代为新的反馈系统。 有关详细信息,请参阅:提交和查看相关反馈