+ 1
How can i create an array of a class type ? I mean array having ot type to be of a class name like classname arrayname
c++
4 Respuestas
+ 1
I tried that but the compiler see's it has error
or is that not like class name nameofarray[] right?
+ 1
Thank you very much. it has accept it
0
you can do it...
class myClass { ... }
myClass arrayOfClass[n];
0
you must declare the size of the array :
ClassName arrayName[10]; // for example