saying nullptr is not declared in this scope.
But I thought nullptr was one of the new keywords?
So I'm assuming g++ is working to an older version
of C++. Or have I misunderstood something about nullptr?
Is it in a different namespace?
To compile the code as C++11, compile with the options -std=c++11 -pedantic-errors (both are required)
You may also want to use these additional options: -Wall -Wextra
Ideally, shun versions of the GNU implementation older than version 5.1.