Skip to content

Latest commit

 

History

History
21 lines (15 loc) · 766 Bytes

compiler-warning-level-4-c4510.md

File metadata and controls

21 lines (15 loc) · 766 Bytes
title description ms.date f1_keywords helpviewer_keywords ms.assetid
Compiler Warning (level 4) C4510
Compiler warning C4510 description and solution.
09/22/2019
C4510
C4510
fd28d1d4-ad27-4dad-94c0-9dba46c93180

Compiler Warning (level 4) C4510

'class' : default constructor could not be generated

The compiler can't generate a default constructor for the specified class, which has no user-defined constructors. Objects of this type can't be created.

There are several situations that prevent the compiler from generating a default constructor, including:

  • A const data member.

  • A data member that's a reference.

To fix this issue, create a user-defined default constructor for the class that initializes these members.