Last edited on
What compiler are you using? It looks like it might not be standards-conforming.
What is the output of g++ --version
?
What do you mean? There was no output. I got a compilation error.
This has nothing to do with the code. Open a shell and run g++ --version