Just one thing here, you mentioned lack of output. I hope you realize, when you run this line, it will sit there forever waiting for input, and nothing else can happen.
Please paste any images you have, directly in your posts. Do not use external links, most people won't follow them.
Also you seem to have hand coded string to integer conversion. C/C++ has built in functions for that, like strtol() and others.