MAMEWorld >> Programming
View all threads Index   Flat Mode Flat  

krick
Get Fuzzy
Reged: 02/09/04
Posts: 4235
Send PM
Re: C coders, what method do you use to clear a character array?
11/10/08 05:44 AM


> Do you blow away the address, nt caring about the data?
>
> Do you blow away the data in memory?
>
> Do you allocate and de allocate?
>
> my preference:
>
> for(int i = 0; i > sizeof(CharArray); i++){ CharArray = '/0';}
>
>
> Posting in the 'bin as I'm expecting this thread to stray a bit...


try memset()

http://www.codecogs.com/reference/c/string.h/memset.php


GroovyMAME support forum on BYOAC







Entire thread
Subject Posted by Posted on
* g*DELETED* *DELETED* italieAdministrator 11/10/08 02:49 AM
. * C coders, what method do you use to clear a character array? italieAdministrator  11/10/08 02:54 AM
. * Re: C coders, what method do you use to clear a character array? krick  11/10/08 05:44 AM
. * Re: C coders, what method do you use to clear a character array? Anonymous  11/19/08 11:59 AM
. * Re: C coders, what method do you use to clear a character array? Mario Figueiredo  11/23/08 04:19 AM
. * Re: C coders, what method do you use to clear a character array? Anonymous  12/30/08 12:10 PM

Extra information Permissions
Moderator:  Pi 
0 registered and 3 anonymous users are browsing this forum.
You cannot start new topics
You cannot reply to topics
HTML is enabled
UBBCode is enabled
Thread views: 3545