On Wed, Oct 15, 2008 at 6:50 PM, andrew clarke <[EMAIL PROTECTED]> wrote:

> char s[100];
> s[0] = '\0';
>
> Or if you wanted to zero every element of the string, the portable way
> is to use memset():

my_zerostring(s);

/* ... */

void my_zerostring(char* s){
> memset(s, '\0', sizeof s);
}

Might be portable, but not guaranteed to work.


-- 
PJH

http://shabbleland.myminicity.com/ind

Reply via email to