using a class constructor w/ class array
I don't know how to describe this, so i'll give some example code:
Code:
class neural_node{
public:
nueral_node(int size){
node_size=size;
}
private:
int node_size;
}
class layer{
public:
layer(int node_size, int number_of_nodes){
layer_nodes=new neural_node[node_size][number_of_nodes];
}
private:
neural_node* layer_nodes;
}
in this, both nueral_node and layer are going to be treated as data types.
my question is this: how can I use the neural_node constructor for the array?
any help will be greatly appreciated!
p.s.
can i actually use a pointer on a class? it's been so long since i used classes.