请帮忙分析一下如何修改。
报警图片如下:
variable 'P' might be set by a nonscalar operator.
变量“p”可以由非标量运算符来设置。
explanation
It appears the code sets the variable with an operator that does not yield a scalar value where Code Analyzer expects one. This message can be incorrect if the operator is overloaded. For information on overloading operators, see “Implementing Operators for Your Class”.
代码似乎使用一个运算符设置变量,该运算符不会产生代码分析器所期望的标量值。如果操作员过载,此消息可能不正确。有关重载运算符的信息,请参阅“为类实现运算符”。
Suggested Action
If Code Analyzer evaluated the code correctly, rewrite it to set the variable to a scalar value. Otherwise, suppress the message as described in Adjust Code Analyzer Message Indicators and Messages.
如果代码分析器正确计算了代码,请重写它以将变量设置为标量值。否则,按调整代码分析器消息指示器和消息中的说明抑制消息。