Re: Where the code trouble is?
- From: CBFalconer <cbfalconer@xxxxxxxxx>
- Date: Thu, 25 Aug 2005 22:09:07 GMT
Anton Petrusevich wrote:
>
> CBFalconer wrote:
>
> > #define BUFSIZE 80
> > #define CAPTION " the Great"
> >
> > int main(void) {
> > char name[BUFSIZE + 1 + strlen(CAPTION)];
>
> Excuse my ignorance, but does it really work? Well, I tried it with gcc and
> I see that it really works, but since when?
That should really have been sizeof(CAPTION) to be portable to
C90. Then it doesn't need the +1 either.
--
Chuck F (cbfalconer@xxxxxxxxx) (cbfalconer@xxxxxxxxxxxxxxxx)
Available for consulting/temporary embedded and systems.
<http://cbfalconer.home.att.net> USE worldnet address!
.
- References:
- Where the code trouble is?
- From: mikelinyoho
- Re: Where the code trouble is?
- From: CBFalconer
- Re: Where the code trouble is?
- From: Anton Petrusevich
- Where the code trouble is?
- Prev by Date: Re: Function Pointers in a Structure?
- Next by Date: Re: How to change the starting address of a structure element?
- Previous by thread: Re: Where the code trouble is?
- Next by thread: Re: Where the code trouble is?
- Index(es):
Relevant Pages
|