0
C++ class help
Hello everyone I was wondering if you can help me out on some questions, What is a properly defined structure struct {int a}; struct a_struct {int a;} struct a_struct int a; struct a_struct {int a;}; another question is when a class is instantiated is a constructor method always executed? Or method and destructor is always executed and lastly can classes can be istantiated more than once.
4 ответов
+ 3
Every time when the class is instantiated the constructor is called.
+ 3
A class can be instantiated as many times as necessary. Except for a class designed with Singleton design.
https://www.sololearn.com/learn/675/?ref=app
+ 2
The properly defined structure is - struct a_struct{Int a;};
0
A class can be instantiated only once