Quantcast
Channel: How to initialize an array instance of the class within it self? - Stack Overflow
Browsing latest articles
Browse All 2 View Live

Answer by sudo for How to initialize an array instance of the class within it...

If you try to instantiate new Node objects in the Node constructor you will keep making recursive calls to the constructor and run out of memory. You are trying to create a node, which creates 10...

View Article



How to initialize an array instance of the class within it self?

I want to be able to create an array of Nodes, within a constructor of Node. However i am getting some kind of heap error. I wrote a Node class with a constructor trying to instantiate Node array with...

View Article
Browsing latest articles
Browse All 2 View Live




Latest Images