problem with ^ operation in c++

Revision en1, by frank1369blogger, 2020-06-26 13:08:34

This code gives me compilation error:

#include <bits/stdc++.h> 

#define debug(x) cerr << #x << ": " << x << endl

using namespace std;

typedef long long ll;

int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout << 2 ^ 3;
  return 0;
}

But when instead of 2 ^ 3 I write (2 ^ 3) it becomes OK. Does anybody know why?

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English frank1369blogger 2020-06-26 13:08:34 394 Initial revision (published)