Superficially, you’re missing a curly bracket at the end. Operationally, your switch statement is switching on a constant, ‘o’, instead of the variable o.
More Related Contents:
- Why ‘&’ reference in not required in classes in C++?
- Creation of simple types in c++
- Why should C++ programmers minimize use of ‘new’?
- c++11 Return value optimization or move? [duplicate]
- What are the differences between C-like, constructor, and uniform initialization?
- Constructor initialization-list evaluation order
- Pretty-print std::tuple
- Assigning parsers to auto variables
- Why is std::function not equality comparable?
- What does “ provide, and where is it documented?
- When does OpenGL get finished with pointers in functions?
- Is main() overloaded in C++?
- C++ – GetUserName() when process is run as administrator
- Reason for using non-type template parameter instead of regular parameter?
- What is Linux utility to mangle a C++ symbol name?
- std::vector to string with custom delimiter
- Are class members guaranteed to be contiguous in memory?
- Is this self initialization valid?
- Creating an object: with or without `new` [duplicate]
- Is there a range class in C++11 for use with range based for loops?
- Same random numbers every time I run the program
- Understanding rvalue references
- How do you copy/paste from the clipboard in C++?
- CMake Error: “add_subdirectory not given a binary directory”
- Why do you use typedef when declaring an enum in C++?
- Static library debug symbols
- allocating vectors (or vectors of vectors) dynamically
- QScrollArea with dynamically changing contents
- opening image file on c++ , PNG , JPEG [closed]
- Is char default-promoted?