Sort of. Given a class A:
A a; ... a = A();
the last statement is not initialisation, it is assignment, but it probably does what you want.
More Related Contents:
- I am trying to develop a Complex number calculator. [closed]
- C++ What’s the standard way to define a recursive constructor?
- What does the explicit keyword mean?
- What is this weird colon-member (” : “) syntax in the constructor?
- Calling virtual functions inside constructors
- Can I call a constructor from another constructor (do constructor chaining) in C++?
- What is a converting constructor in C++ ? What is it for?
- Do built-in types have default constructors?
- Conversion constructor vs. conversion operator: precedence
- What is the default constructor for C++ pointer?
- Scope of variables in if statements
- Who deletes the memory allocated during a “new” operation which has exception in constructor?
- call to pure virtual function from base class constructor
- How can i use member initialization list to initialize an array?
- Destructors of builtin types (int, char etc..)
- Do I really need to implement user-provided constructor for const objects?
- avoiding the tedium of optional parameters
- Can class template constructors have a redundant template parameter list in c++20
- Will an ’empty’ constructor or destructor do the same thing as the generated one?
- How to add constructors/destructors to an unnamed class?
- Struct Constructor in C++?
- Initializing a union with a non-trivial constructor
- Constructor initialization Vs assignment
- No matching function for call to Class Constructor
- Why must initializer list order match member declaration order?
- Default member values best practice
- Why should I prefer to use member initializer lists?
- How do I initialize a const data member?
- Scope resolution operator being used twice
- C++ Constructor/Destructor inheritance