这是我正在处理的游戏引擎代码的一部分.当我构建/调试代码时,它会因编译错误而停止:"Camera.cpp(70):错误C2059:语法错误:'=='"和第70行是
if ( near == far )线.它也发生在第75行:
(if near == NULL || far == NULL)
bool Camera::SetClippingPlanes( float near, float far )
{
if (near == far) //Line 70(First Error)
{
MessageBox(NULL, L"ERROR: The far and near clipping planes cannot be equal!", L"Error", MB_OK | MB_ICONERROR);
return false;
}
else
{
if (near == NULL || far == NULL) //Line 75(Second Error)
{
MessageBox(NULL, L"ERROR: Near and/or Far clipping planes are null!", L"Error", MB_OK | MB_ICONERROR);
return false;
} …Run Code Online (Sandbox Code Playgroud)