Re: [SLUG] Code name C

2005-11-23 Thread O Plameras
[EMAIL PROTECTED] wrote: I find this interesting. char* somefunction() { char string2[] = "some words"; return string2; } -- doesn't Hi Yiz, A couple of people have explained why the above does not work. My attention will focus on How

Re: [SLUG] Code name C

2005-11-23 Thread Ken Foskey
On Wed, 2005-11-23 at 13:13 +1100, Benno wrote: > On Tue Nov 22, 2005 at 19:47:51 -0600, [EMAIL PROTECTED] wrote: > >- > >char* somefunction() > >{ > > char string2[] = "some words"; > > return string2; > >} > >-- > >doesn

Re: [SLUG] Code name C

2005-11-22 Thread Benno
On Tue Nov 22, 2005 at 19:47:51 -0600, [EMAIL PROTECTED] wrote: > >I find this interesting. > >This piece of code >--- >char* somefunction() >{ > char *string2 = "some words"; > return string2; >} >--- In this case

[SLUG] Code name C

2005-11-22 Thread yiz
I find this interesting. This piece of code --- char* somefunction() { char *string2 = "some words"; return string2; } --- works, but this piece of code - char* somefunction() {