On 30 April 2015 at 05:47, Andrew wrote: > I have the following piece of code which I believe to be correct, N.B. Your main() function doesn't have a return type, which is incorrect. (That's not the cause of the problem though, g++ allows main to have no return type unless you use -Wpedantic)