The second and third arguments to the ternary operator are expressions, not statements.
return a
is a statement
More Related Contents:
- Possibilities to quit a function
- Return array in a function
- How to “return an object” in C++?
- return statement vs exit() in main()
- C++ return array from function [duplicate]
- How to return a std::string.c_str()
- exit() call inside a function which should return a reference
- Avoiding copy of objects with the “return” statement
- How do I return a char array from a function?
- Function in C++ returns by value or by reference?
- Does std::cout have a return value?
- How to return array from C++ function to Python using ctypes
- Returning a void?
- When is explicit move needed for a return statement?
- What happens when a function that returns an object ends without a return statement
- Function returning array but main showing garbage [duplicate]
- How do C++ progs get their return value, when a return is not specified in the function?
- Using paragraphs 8.5.3p4 and p5 in the C++11 Standard, how do I prove that the snippet below doesn’t compile?
- On which platforms does integer divide by zero trigger a floating point exception?
- How to specialize std::hash::operator() for user-defined type in unordered containers?
- How many levels of pointers can we have?
- Why floating point value such as 3.14 are considered as double by default in MSVC?
- condition variable – why calling pthread_cond_signal() before calling pthread_cond_wait() is a logical error?
- g++ does not show a ‘unused’ warning
- Class type non-type template parameter initialization does not compile
- Is a destructor called when an object goes out of scope?
- Best way to determine if two path reference to same file in Windows?
- getline() does not work if used after some inputs [duplicate]
- Is it bad practice to allocate memory in a DLL and give a pointer to it to a client app?
- How to run specific test cases in GoogleTest