IR> Cameron Clark, All, 25 Aug 97, 08:51
CC> char string[6];
CC> strcpy(string,"12345");
CC> string[strlen(string)] = '\n';
IR> Somebody already answered your question, but I also
IR> wish to note that your
IR> code is broken, because it removes the string's terminating zero.
I was going to point that out, too. However, his code isn't broken.
Although his code says "string" it isn't used as a normal string after the
point he kills his terminating zero. It's used as a buffer, and buffers
don't have termination.
--- Maximus/2 3.01
---------------
* Origin: Tanktalus' Tower BBS (1:250/102)
|