My code written in CodeBlocks doesn't work correctly on

This code :
is a code for changing numbers to letters ! (not in English)
It works correctly in CodeBlocks !
I gave it to another one , he said it terminates the program before it prints out the last number !
This is the error he sent to me :

For example in CodeBlocks if the input is : 2222224
the output is :
do million o divist o bist o do hezar o divist o bist o char

But in Borland the last "char" (char means four) is not printed and as you see "Abnormal program termination .

Waht should I do ? (Except telling him to change his compiler)
I mean waht changes should I make to my code ?
I still need the answer !
Any help would be appreciated .
(Sorry for spam)
The only thing that jumped out at me was that

if (input [i + 1] != '0' && i != length - 1)

should be:

if ( i != length-1 && input[i+1] != '0' )
Last edited on
I will test it .
BUT what is the difference ?
Do their priority matter ?
The order matters very much, if you check the index before checking if you even *can* check it in the first place, you will have problems.
Topic archived. No new replies allowed.