Hi,
im a newbie in C>
Currently my string is "abcde" and i would like to set it to "", which is to a length of 0. May i know how to do it?
Thanks in advance.
Hi,
im a newbie in C>
Currently my string is "abcde" and i would like to set it to "", which is to a length of 0. May i know how to do it?
Thanks in advance.
char str[10] ="Abcde";
str[0] = 0; // or '\0'
--
Mats
Compilers can produce warnings - make the compiler programmers happy: Use them!
Please don't PM me for help - and no, I don't do help over instant messengers.