jeudi 26 mars 2015

Is it possible to create a dynamic array of structs from when a class object is created? [on hold]


Is it possible to create a dynamic array of structs from when a class object is created?


This would be in main:



//create new class object:
Node node(3,5);


Node.h:



class Node
{
public:
node(int, int); //constructor
private:
//dynamic structure here ?
}


Node.cpp:



Node::Node(int r, int c)
{
//new struct array rows = r ?
//new struct array columns = c ?
}



Aucun commentaire:

Enregistrer un commentaire