|
From: Ioannis V. <no...@ho...> - 2003-02-27 19:26:05
|
-------Original Message-------=0D
=0D
From: gi...@li...=0D
Date: =D0=DD=EC=F0=F4=E7, 27 =D6=E5=E2=F1=EF=F5=DC=F1=E9=EF=F2 2003 8:10:=
41 =EC=EC=0D
To: Dev-C++ Mailing List=0D
Subject: Re: [Dev-C++] need some explanation=0D
=0D
OK, guys, it's clear now.=0D
=0D
I'm a bit less concerned, because I do not use the notation =0D
char s[3] =3D "abc";=0D
but have learned to use one of the safer ones: =0D
char *s =3D "abc";=0D
or=0D
char s[] =3D "abc"; =0D
=0D
That is the reason why the piece of code seemed correct to me.=0D
=0D
Of course the following is correct both in C89 and C++98, isn't it?=0D
char s[3] =3D { 'a', 'b', 'c' }; =0D
=0D
=0D
=3D=3D> Yes, it is valid C & C++ including the following:=0D
=0D
char s[3]=3D"ab";=0D
=0D
=0D
which is equivalent to the equally valid: char s[3]=3D{'a','b','\0'};=0D
=0D
=0D
Ioannis Vranos=0D
=0D
* Programming pages: http://www.noicys.freeurl.com=0D
* Alternative URL: http://run.to/noicys=20 |