What is the difference between std::atoi() and std::stoi?

1). Are there any other differences between the two? I find std::atoi() a horrible function: It returns zero on error. If you consider zero as a valid input, then you cannot tell whether there was an error during the conversion or the input was zero. That’s just bad. See for example How do I tell if the c … Read more

How do I activate C++ 11 in CMake?

As it turns out, SET(CMAKE_CXX_FLAGS “-std=c++0x”) does activate many C++11 features. The reason it did not work was that the statement looked like this: Following this approach, somehow the -std=c++0x flag was overwritten and it did not work. Setting the flags one by one or using a list method is working.