Is there any way to specify a "null" character?
Code:char test; test=""; and test='' doesn't work. Returns an error message.
Is there any way to specify a "null" character?
Code:char test; test=""; and test='' doesn't work. Returns an error message.
well a null character equals to '\0'. so you can trysomeone could correct me if i'm wrong.Code:test = '\0'
>or
>char test=0;
It's best to use the literal that best reflects the type you're working with. For pointers that means NULL, for characters that means '\0'. 0 will work for both, but it has a tendency to hurt the self-documentation of your code.
My best code is written with the delete key.