• Advertisement

Archived

This topic is now archived and is closed to further replies.

malloc call -> new call

This topic is 5555 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi, My problem is the following : I can't figure out the equivalent of :
expression=(Symbol**)malloc(length*sizeof(Symbol*));  
with the new operator... In a common way, how can I create dynamic array of pointers with new??? Can someone help me? [edited by - MostSignificantBit on December 4, 2002 9:38:11 PM]

Share this post


Link to post
Share on other sites
Advertisement

  
expression = new Symbol*[length];
...
delete[] expression;


Remember to delete with delete[] though.

Share this post


Link to post
Share on other sites

  • Advertisement