Update libmain.cc

post increment is for the birds