Not giving any output

my code : https://ide.codingblocks.com/s/198884

it seems function convertToInt( ) line:20-28 is returning zero every time.

how to rectify it?