Hello.
I've created this code that differentiate between various uses of banks like for example if the user enters he went to bank to deposit money and then went to the river bank
The output will be finance river
The code is not working correctly please help me.
I've got plenty of pointers, but I think you may find the most useful of them to be #1.
1. In function checkbank(), you are using input.txt where all other functions are using inputlow.txt
2. Why are you using files to transfer data? Why not just pass the data among the functions as a string?
3. Where is all the white-space? Have a white-space phobia?
4. In function conv(), ptr1 and ptr2 are not defined anywhere within the scope that you provided. This should not even compile.
5. Function checkr() has char ch[20] that is unused. Not really important, but it is wasted space.
6. Why are your functions defined inside main()? Normally they are defined globally. Ie