this post was submitted on 13 Sep 2023
8 points (100.0% liked)
C++
1775 readers
1 users here now
The center for all discussion and news regarding C++.
Rules
- Respect instance rules.
- Don't be a jerk.
- Please keep all posts related to C++.
founded 1 year ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
In the get() function, instead of if{}... if{}... return it should be if{}... else if{}... else {return...}
This would be better style in my opinion, but by way of correctness it seems the more fundamental issue is "return" missing in the if... else if... blocks.