Is it always printing the first line only? Or nothing changes at all when changing the code? Perhaps you forgot to re-run
g++
after changing the file?