ssylee
8/12/2008 8:03:00 PM
On Aug 12, 12:15 pm, santosh <santosh....@gmail.com> wrote:
> ssylee wrote:
> > If I'm being supplied with a char* that is not null-terminated, is it
> > impossible to transform it into a null terminated char* with only
> > abstract information about the char* information?
>
> It depends. One piece of information that you *must* know is *where* to
> place the null character, i.e., you must know the length of the char
> array that your char* points at. Otherwise you'll either truncate your
> array or write beyond it's bounds.
>
> What abstract information have you been given about the char*?
Thank you for your replies. I found out that there is an information
that I have missed out in terms of the ASCII to UNICODE conversions.
So I guess this problem is solved.