Skip to main content
gamedev.net
🔒 Locked

Stupid problem

Started by BradDaBug Jan 10, 2004 at 5:50 PM 1 replies 250+ views
Original Post
BradDaBug
BradDaBug
I have no idea why this isn''t working, but it''s not. I''m trying to dynamically allocate an array of pointers, but g++ keeps saying "parse error before ''*'' token." Here''s the code: float **blah = new *float[20]; It won''t work. What am I doing wrong?
I like the DARK layout!
Koshmaar
Koshmaar
Well, you can't mulitply new by array ;-) If you want to create a array of pointers just do sth like this:

(edited, removed)

Now you've got array of 20 unintialized pointers to float. Hope that helps :-)

EDIT: Sorry for my stupidity, pjcast is correct :-/

[edited by - Koshmaar on January 10, 2004 7:18:35 PM]

Topic Locked

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

Sign in to reply to this topic.