coins.cpp: In function 'std::vector<int> coin_flips(std::vector<int>, int)':
coins.cpp:6:9: error: expected unqualified-id before 'xor' token
6 | int xor = 0;
| ^~~
coins.cpp:8:19: error: expected primary-expression before 'xor' token
8 | if (b[i]) xor ^= i;
| ^~~
coins.cpp:8:23: error: expected primary-expression before '^=' token
8 | if (b[i]) xor ^= i;
| ^~
coins.cpp:10:9: error: expected primary-expression before 'xor' token
10 | if (xor == c)
| ^~~
coins.cpp:10:13: error: expected primary-expression before '==' token
10 | if (xor == c)
| ^~
coins.cpp:11:15: error: request for member 'push_back' in 'flips', which is of non-class type 'std::vector<int>()'
11 | flips.push_back(0);
| ^~~~~~~~~
coins.cpp:13:15: error: request for member 'push_back' in 'flips', which is of non-class type 'std::vector<int>()'
13 | flips.push_back(xor^c);
| ^~~~~~~~~
coins.cpp:13:25: error: expected primary-expression before 'xor' token
13 | flips.push_back(xor^c);
| ^~~
coins.cpp:13:28: error: expected primary-expression before '^' token
13 | flips.push_back(xor^c);
| ^
coins.cpp:14:12: error: could not convert 'flips' from 'std::vector<int>()' to 'std::vector<int>'
14 | return flips;
| ^~~~~
| |
| std::vector<int>()
coins.cpp: In function 'int find_coin(std::vector<int>)':
coins.cpp:18:9: error: expected unqualified-id before 'xor' token
18 | int xor = 0;
| ^~~
coins.cpp:20:19: error: expected primary-expression before 'xor' token
20 | if (b[i]) xor ^= i;
| ^~~
coins.cpp:20:23: error: expected primary-expression before '^=' token
20 | if (b[i]) xor ^= i;
| ^~
coins.cpp:22:12: error: expected primary-expression before 'xor' token
22 | return xor;
| ^~~
coins.cpp:22:15: error: expected primary-expression before ';' token
22 | return xor;
| ^