Snap! if Statement in C++

How would you make the Snap! if statement in C++, like how you can do this with JS.

What I have tried:

     // ifc if1 if2 ifcheck ifdo
      cin >> if1;
      cin >> ifc;
      cin >> if2;
      cin >> ifdo;
      if(ifdo == "DO"){
        cin>>ifdo;
      }
      if(ifc == "="){
        if(if1 == if2){
          input = ifdo;
        } else {}
      } else if(ifc == "!="){
        if(if1 != if2){
          
        } else if(if1 == if2){} else{cout << "\033[31m"
             << "\033[101m";
        cout << "ERROR 409, TRY: '=' '!='" << endl;
        cout << "\033[0m";
        errors = errors + 1;}
      }
    }