Skip to content

Latest commit

 

History

History
38 lines (30 loc) · 728 Bytes

compiler-error-c2514.md

File metadata and controls

38 lines (30 loc) · 728 Bytes
descriptiontitlems.datef1_keywordshelpviewer_keywordsms.assetid
Learn more about: Compiler Error C2514
Compiler Error C2514
11/04/2016
C2514
C2514
4b7085e5-6714-4261-80b7-bc72e64ab3e8

Compiler Error C2514

'class' : class has no constructors

The class, structure, or union has no constructor with a parameter list that matches the parameters being used to instantiate it.

A class must be fully declared before it can be instantiated.

The following sample generates C2514:

// C2514.cpp// compile with: /cclassf; classg { public:g (int x); }; classfmaker { f *func1() { returnnewf(2); // C2514 } g *func2() { returnnewg(2); // OK } };
close