My program crashes with this code

Printable View