I suspect your program doesn't have a return statement or return -1.
Process terminated with status of 255.
show the return code of your application.
I suggest to check the 'pause when execution ends' in project properties.
In console:
The second line will show the last return code.
(and it should be the same as reported by the IDE).