小编Nir*_*o56的帖子

语法错误"=="

这是我正在处理的游戏引擎代码的一部分.当我构建/调试代码时,它会因编译错误而停止:"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)

c++ syntax-error game-engine

6
推荐指数
2
解决办法
368
查看次数

标签 统计

c++ ×1

game-engine ×1

syntax-error ×1