hello ppl...
well...i have a very strange problem...
I have an array of chars, and a buffer, that read a text file and pass char by char to this array...
till there everything is ok...
so...I begin to read a file and after a word finishes, i have to put a marker in the array to know that the word has ended...
and this marker is the \0
so, for example:
i have on a text file:
public void
and i pass it to a char, and it has to be like this:
public\0void\0
but, after I put the first \0, i dont know why, i cant put anything else on that array...the insertion doesnt work...
if I change the marker to something else like #, it works perfectly...
but i want the \0 to be the marker because a # or any other symbol can appear in the text...
anyone know why thats happening and how to sove it?
If you have a '\0' in a character array the output will stop there and other characters after that won't be displayed after that but they are there.
I suggest you separating the words with a space ' ' and have the null character only at the end of all the words you need
uhn...
ok, thx...
i´ll do it like u said...
^^
thank u...it was very helpfull...
i was already with a headache trying to figure out why it was not adding the lefting chars...
=D