Archived

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

CProgrammer

dynamically allocated memory fast way to fill with values

Recommended Posts

I have an array: int **x; Now i know all the values i want to put in how can i do this in one go. Im thinking of something like: int y[] = { {1},{2} }; How can i transfer this to my problem. PS: x has already been used and the memory has been initialised. Do i have to make a temporary variable and then copy the content or is there a direct way? -CProgrammer [edited by - CProgrammer on October 22, 2003 2:36:46 AM]

Share this post


Link to post
Share on other sites
As for me, idea with temportary variable is good.




"The Gods Made Heavy Metal And They Saw That It Was Good They Said To Play It Louder Than Hell We Promised That We Would
When Losers Say Its Over With You Know That It’s A Lie The Gods Made Heavy Metal And It’s Never Gonna Die"

THE GODS MADE HEAVY METAL/by
ManOwaR

Share this post


Link to post
Share on other sites