Also, you've made your function return a char, but you don't return anything. Make the function void or return 0; or something.