how do i clear data in a variable?

how would i clear data in a string variable? or a char[] variable?

any and all help appreciated .. Thnx :-)

DarkFire

Comments

  • : how would i clear data in a string variable? or a char[] variable?
    :
    : any and all help appreciated .. Thnx :-)
    :
    : DarkFire
    :

    [blue]just set the first byte to zero (NULL) or optionally set all bytes to zero.[/blue]
  • : : how would i clear data in a string variable? or a char[] variable?
    : :
    : : any and all help appreciated .. Thnx :-)
    : :
    : : DarkFire
    : :
    :
    : [blue]just set the first byte to zero (NULL) or optionally set all bytes to zero.[/blue]
    :

    ok this may be dumb but ... how?

  • : : : how would i clear data in a string variable? or a char[] variable?
    : : :
    : : : any and all help appreciated .. Thnx :-)
    : : :
    : : : DarkFire
    : : :
    : :
    : : [blue]just set the first byte to zero (NULL) or optionally set all bytes to zero.[/blue]
    : :
    :
    : ok this may be dumb but ... how?
    :
    :


    char [] str="abc";
    ...

    str[0]=''; /* same as str[0]=NULL; or str[0]=0;*/
  • : [red]char str[]="abc";[/red]
    : ...
    :
    : str[0]=''; /* same as str[0]=NULL; or str[0]=0;*/
    :

    [blue]bug correction[/blue]
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories