0

Is this ok to do this ?

struct stuff {string nom int age}; main typedef struct stuff stuff stuff *p = new stuff [n] I know this it's not a complete code but my question is can u make an object with a pointer? and then use dinámic memory?

19th Oct 2017, 9:59 PM
Efrain Ochoa
Efrain Ochoa - avatar
1 Antwort
+ 2
Yes, you can. It is allowed. // If not, we couldn't use polymorphism as we do.
25th Oct 2017, 3:14 PM
Solo Wanderer 4315
Solo Wanderer 4315 - avatar