An Optional Is Not an Integer
A wraps a value that might be absent. Consider this code:
1std::optional<int> attempts = 3;2std::cout << attempts + 1;Will it compile? What should we do if attempts might be empty?
What is the problem with this code?
0 of 1 done