MAMEWorld >> Programming
View all threads Index   Flat Mode Flat  

italieAdministrator
MAME owes italie many thank yous, hah
Reged: 09/20/03
Posts: 15243
Loc: BoomTown
Send PM
C coders, what method do you use to clear a character array?
11/10/08 02:54 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:


Code:

 for(int i = 0; i > sizeof(CharArray); i++){ CharArray[i] = '/0';} 




Just getting a feel for who's doing what, had a lengthy discussion about this earlier and I'm curious....







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 2 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