Skip to main content
GameDev.net gamedev.net
🔒 Locked

memory allocating

Started by kudi Aug 10, 2001 at 4:19 AM 0 replies 450+ views
Original Post
kudi
kudi
Hi I have a really curious problem. When I use the D3DLVERTEX structure, I can initialize my array like this: D3DLVERTEX** VertexField; VertexField=new D3DLVERTEX*[SIZE]; for(i=0;i=new D3DLVERTEX[SIZE]; } But when I use just the datatype float, my program finishes: float** VertexField; VertexField=new float*[SIZE]; for(i=0;i
The problem of Object Oriented Programming:Everybody tells you how to use his classes, but nobody how not to do it !
Stoffel
Stoffel
1) Use source tags [ source ] and [ /source ] (without the spaces) when you include code here so we can see it properly.

2) What''s the problem? Both of those look correct--they each allocate a SIZE-by-SIZE matrix of values.

3) "But when I use just the datatype float, my program finishes". Meaning what? Do you mean the other way doesn''t finish? Or by finish do you mean it crashes?

Both of these loops look fine to me. Either I''m missing something, or the problem (which would be what?) is not in the code you''ve listed.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.