[rescue] Cooling (Long Message, sorry)

Scott Newell newell at cei.net
Tue Apr 16 22:37:36 CDT 2002


>float * test() {
>  int x = 3;
>  int y = 4;
>
>  float f[x][y];
>
>  return (float *)f;

Uh, aren't you returning an auto?  The stack frame (and your 2d array
f[][]) will disappear when the function test() returns.


newell



More information about the rescue mailing list