On 29 October 2012 23:44, Perry Smith wrote: > > On Oct 29, 2012, at 1:47 PM, Jonathan Wakely wrote: > >> Compiling with gcc does not imply you're not compiling C++. > > So, in my sample code, how do you compile it with gcc? >
Put it in a file that ends with .cc or .cpp or .C or .cxx or any of the other extensions listed at http://gcc.gnu.org/onlinedocs/gcc/Invoking-G_002b_002b.html as I already explained. To link it use -lsupc++