>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