Article View: borland.public.cppbuilder.nativeapi
Article #17241Re: Problem in deleting file!
From: Early Ehlinger
Date: Mon, 31 Mar 2003 15:19
Date: Mon, 31 Mar 2003 15:19
24 lines
1979 bytes
1979 bytes
"Remy Lebeau (TeamB)" <gambit47@yahoo.com> wrote:
> I don't know what the C++ spec says the
> official rules are about initializing
> fixed-sized character buffers with "",
> though. I always prefer to use {0}
> because it can be applied to structures
> as well, which "" can't be.
I'm working from memory here, so I could be wrong - it would be a first for
me, of course :/
I'm pretty sure that the spec does /not/ require that the entire buffer be
zeroed out, so long as it starts with a zero-length null-terminated string
(i.e., starts w/ '\0'), so
char szBuf[5] = "";
could legally mean the same thing as:
char szBuf[5] = { '\0' , 'a' , 'b' , 'c' , 'd' };
--
-- Early Ehlinger CEO, ResPower Inc - Toll-Free : 866-737-7697
-- www.respower.com -- 500+ GHz Supercomputer Starting At USD$0.50/GHz*Hour
Technical Details
Message-ID:
<3e885c79$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-09!supernews.com!iad-peer.news.verio.net!news.verio.net!newsfeed.wirehub.nl!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mailReferences:
<3E8408FF.5040308@alloymail.com> <3e840eac$1@newsgroups.borland.com> <3E842BD0.1060302@alloymail.com> <3e84ad5c$1@newsgroups.borland.com> <3e84b0d4$1@newsgroups.borland.com> <3e84fa8a@newsgroups.borland.com> <3e84fd91$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10cc67,5fde27ba165b16db X-Google-Attributes: gid10cc67,public X-Google-ArrivalTime: 2003-03-31 07:22:33 PST From: "Early Ehlinger" <early@respower.com> Newsgroups: borland.public.cppbuilder.nativeapi References: <3E8408FF.5040308@alloymail.com> <3e840eac$1@newsgroups.borland.com> <3E842BD0.1060302@alloymail.com> <3e84ad5c$1@newsgroups.borland.com> <3e84b0d4$1@newsgroups.borland.com> <3e84fa8a@newsgroups.borland.com> <3e84fd91$1@newsgroups.borland.com> Subject: Re: Problem in deleting file! Date: Mon, 31 Mar 2003 09:19:17 -0600 Lines: 27 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2600.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 NNTP-Posting-Host: 206.166.224.226 Message-ID: <3e885c79$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1049123961 206.166.224.226 (31 Mar 2003 07:19:21 -0800) Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-09!supernews.com!iad-peer.news.verio.net!news.verio.net!newsfeed.wirehub.nl!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mail