I am working on something to basically hold references to several objects. So the plan was something like this:
However I get compiler errors when I try this. Can anyone tell me how to dynamically allocate pointers?Code:obj **cPList=new *obj[30];
This is a discussion on Dynamically allocate a pointer? within the C++ Programming forums, part of the General Programming Boards category; I am working on something to basically hold references to several objects. So the plan was something like this: Code: ...
I am working on something to basically hold references to several objects. So the plan was something like this:
However I get compiler errors when I try this. Can anyone tell me how to dynamically allocate pointers?Code:obj **cPList=new *obj[30];
Thank you.Originally Posted by Tonto
How about
Next time, post your error message(s) as well, along with which OS and compiler you're using.Code:obj **cPList=new obj*[30];
If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
If at first you don't succeed, try writing your phone number on the exam paper.
I support http://www.ukip.org/ as the first necessary step to a free Europe.