C++ | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

C++

What does | mean in mask|(1<<city) Where mask and city,are integer?

23rd Jan 2022, 5:48 AM
narges ghanbari
narges ghanbari - avatar
1 Answer
+ 5
The pipe symbol `|` is known as bitwise OR operator whereas `<<` is bitwise left shift operator. Take a look at these community lessons. https://www.sololearn.com/learn/4073/?ref=app https://www.sololearn.com/learn/4087/?ref=app
23rd Jan 2022, 5:53 AM
Simba
Simba - avatar