So i ran the below code on codeblocks
No, you run it on your operating system. Codeblocks is only a editor, it can not run, or compile code...
Codeblocks does not influence the output of your program.
So my suggestion is that you have simply not build the code and run a older version of your application? Remember, the green arrow only runs the program and does not check if it has to be build first!
Have you tried Build->Rebuild?