Code works with g++ compilier