When defining a struct in C++, what does the compiler implicitly provide? 

  • Default constructor 
  • Virtual destructor 
  • Overloaded operators 
  • Private members
When defining a struct in C++, the compiler will implicitly provide a default constructor if no constructors are explicitly defined. However, it won't automatically provide virtual destructors, overloaded operators, or private members without explicit definitions.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *