You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 48bb8f9
Browse filesBrowse the repository at this point in the historyBrowse files
The articles in this part of the documentation contain information about a subsection of the Visual C++ compiler errors. You can access the information here or, in the **Output** window in Visual Studio, you can select an error number and then choose the F1 key.
|[Compiler Error C2500](compiler-error-C2500.md)|'*identifier1*': '*identifier2*' is already a direct base class|
64
+
|Compiler Error C2501|'*identifier*': '__declspec(*specifier*)' can only be applied to structs, unions, classes, or unsigned bit field members|
65
+
|[Compiler Error C2502](compiler-error-C2502.md)|'*identifier*': too many access modifiers on the base class|
66
+
|[Compiler Error C2503](compiler-error-C2503.md)|'*class*': base classes cannot contain zero-sized arrays|
67
+
|[Compiler Error C2504](compiler-error-C2504.md)|'*class*': base class undefined|
68
+
|[Compiler Error C2505](compiler-error-C2505.md)|'*symbol*': '__declspec(*specifier*)' can only be applied to declarations or definitions of global objects or static data members|
69
+
|[Compiler Error C2506](compiler-error-C2506.md)|'*member*': '__declspec(*specifier*)' cannot be applied to this symbol|
70
+
|[Compiler Error C2507](compiler-error-C2507.md)|'*identifier*': too many virtual modifiers on the base class|
71
+
|Compiler Error C2508|'*identifier*': '\_\_declspec(*specifier1*)' cannot be combined with '\_\_declspec(*specifier2*)'|
72
+
|[Compiler Error C2509](compiler-error-C2509.md)|'*identifier*': member function not declared in '*class*'|
73
+
|[Compiler Error C2510](compiler-error-C2510.md)|'*identifier*': left of '::' must be a class/struct/union|
74
+
|[Compiler Error C2511](compiler-error-C2511.md)|'*identifier*': overloaded member function not found in '*class*'|
75
+
|[Compiler Error C2512](compiler-error-C2512.md)|'*identifier*': no appropriate default constructor available|
76
+
|[Compiler Error C2513](compiler-error-C2513.md)|'*type': no variable declared before '='|
77
+
|[Compiler Error C2514](compiler-error-C2514.md)|'*class*': class has no constructors|
78
+
|Compiler Error C2515|'*identifier*': 'vtguard' can only be applied to class declarations or definitions|
79
+
|[Compiler Error C2516](compiler-error-C2516.md)|'*class*': is not a legal base class|
80
+
|[Compiler Error C2517](compiler-error-C2517.md)|'*identifier*': right of '::' is undefined|
81
+
|[Compiler Error C2518](compiler-error-C2518.md)|keyword '*keyword*' illegal in base class list; ignored|
82
+
|Compiler Error C2519|'*identifier*': WinRT attributes may only contain public fields|
83
+
|Compiler Error C2520|'*class*': no non-explicit constructor available for implicit conversion|
84
+
|[Compiler Error C2521](compiler-error-C2521.md)|a destructor/finalizer does not take any arguments|
85
+
|Compiler Error C2522|'*identifier*': Overload identifier cannot be used on '*identifier1*' as it's already specified on '*identifier2*'|
86
+
|[Compiler Error C2523](compiler-error-C2523.md)|'*class*::~*identifier*': destructor/finalizer tag mismatch|
87
+
|[Compiler Error C2524](compiler-error-C2524.md)|'*identifier*': a destructor/finalizer must have a 'void' parameter list|
88
+
|Compiler Error C2525|'*identifier*': The parameter '*identifier1*' is named '*identifier2*' on the base function and must be matched in a published implementation|
89
+
|[Compiler Error C2526](compiler-error-C2526.md)|'*identifier1*': C linkage function cannot return C++ class '*identifier2*'|
90
+
|Compiler Error C2527|'*identifier*': DefaultOverload cannot be specified on both '*function1*' and '*function2*'. Remove one specification or rename the function during implementation|
91
+
|[Compiler Error C2528](compiler-error-C2528.md)|'*identifier*': pointer to reference is illegal|
92
+
|[Compiler Error C2529](compiler-error-C2529.md)|'*identifier*': reference to reference is illegal|
93
+
|[Compiler Error C2530](compiler-error-C2530.md)|'*identifier*': references must be initialized|
94
+
|[Compiler Error C2531](compiler-error-C2531.md)|'*identifier*': reference to a bit field illegal|
95
+
|[Compiler Error C2532](compiler-error-C2532.md)|'*identifier*': illegal modifier for reference|
96
+
|[Compiler Error C2533](compiler-error-C2533.md)|'*identifier*': constructors not allowed a return type|
97
+
|[Compiler Error C2534](compiler-error-C2534.md)|'*identifier*': constructor cannot return a value|
98
+
|[Compiler Error C2535](compiler-error-C2535.md)|'*identifier*': member function already defined or declared|
|[Compiler Error C2540](compiler-error-C2540.md)|non-constant expression as array bound|
104
+
|[Compiler Error C2541](compiler-error-C2541.md)|'*identifier*': cannot delete objects that are not pointers|
105
+
|[Compiler Error C2542](compiler-error-C2542.md)|'*identifier*': class object has no constructor for initialization|
106
+
|[Compiler Error C2543](compiler-error-C2543.md)|expected ']' for operator '[]'|
107
+
|[Compiler Error C2544](compiler-error-C2544.md)|expected ')' for operator '()'|
108
+
|[Compiler Error C2545](compiler-error-C2545.md)|'*operator*': unable to find overloaded operator|
109
+
|Compiler Error C2546|'*identifier*': when a type is defined in both a PIA and a no-PIA the PIA must be referenced first|
110
+
|Compiler Error C2547|'*identifier*': All parameters of a published method must be explicitly named on the declaration|
111
+
|[Compiler Error C2548](compiler-error-C2548.md)|'*function*': missing default parameter for parameter *parameter*|
112
+
|[Compiler Error C2549](compiler-error-C2549.md)|user-defined conversion cannot specify a return type|
113
+
|[Compiler Error C2550](compiler-error-C2550.md)|'*identifier*': constructor initializer lists are only allowed on constructor definitions|
114
+
|[Compiler Error C2551](compiler-error-C2551.md)|'void *' type needs explicit cast|
115
+
|[Compiler Error C2552](compiler-error-C2552.md)|'*identifier*': non-aggregates cannot be initialized with an initializer list|
116
+
|[Compiler Error C2553](compiler-error-C2553.md)|'*type**derived_class*::*function*': overriding virtual function return type differs from '*type**base_class*::*function*'|
117
+
|[Compiler Error C2555](compiler-error-C2555.md)|'*derived_class*::*function*': overriding virtual function return type differs and is not covariant from '*base_class*::*function*'|
118
+
|[Compiler Error C2556](compiler-error-C2556.md)|'*type1**class*::*function*': overloaded function differs only by return type from '*type2**class*::*function*'|
119
+
|[Compiler Error C2557](compiler-error-C2557.md)|'*identifier*': private and protected members cannot be initialized without a constructor|
120
+
|[Compiler Error C2558](compiler-error-C2558.md)|class '*class*': no copy constructor available or copy constructor is declared 'explicit'|
121
+
|Compiler Error C2559|'*identifier*': cannot overload a member function without ref-qualifier with a member function with ref-qualifier|
122
+
|Compiler Error C2560|'*identifier*': cannot overload a member function with ref-qualifier with a member function without ref-qualifier|
123
+
|[Compiler Error C2561](compiler-error-C2561.md)|'*function*': function must return a value|
124
+
|[Compiler Error C2562](compiler-error-C2562.md)|'*function*': 'void' function returning a value|
125
+
|[Compiler Error C2563](compiler-error-C2563.md)|mismatch in formal parameter list|
126
+
|Compiler Error C2564|Obsolete.|
127
+
|Compiler Error C2565|'*identifier*': ref-qualifier is illegal for constructors/destructors|
128
+
|[Compiler Error C2566](compiler-error-C2566.md)|overloaded function in conditional expression|
129
+
|[Compiler Error C2567](compiler-error-C2567.md)|unable to open metadata in '*filename*', *possible_reason*|
130
+
|[Compiler Error C2568](compiler-error-C2568.md)|'*identifier*': unable to resolve function overload|
131
+
|[Compiler Error C2569](compiler-error-C2569.md)|'*identifier*': enum/union cannot be used as a base class|
132
+
|[Compiler Error C2570](compiler-error-C2570.md)|'*identifier*': union cannot have base classes|
133
+
|[Compiler Error C2571](compiler-error-C2571.md)|'*identifier*': virtual function cannot be in union '*union*'|
134
+
|[Compiler Error C2572](compiler-error-C2572.md)|'*function*': redefinition of default argument: parameter *number*|
135
+
|[Compiler Error C2573](compiler-error-C2573.md)|'*class*': cannot delete pointers to objects of this type; the class has no non-placement overload for 'operator delete'. Use ::delete, or add 'operator delete(void*)' to the class|
136
+
|[Compiler Error C2574](compiler-error-C2574.md)|'*destructor*': cannot be declared static|
137
+
|[Compiler Error C2575](compiler-error-C2575.md)|'*identifier*': only member functions and bases can be virtual|
138
+
|Compiler Error C2576|'*identifier*': cannot introduce a new virtual method as 'public'. Consider making the method non-virtual, or change the accessibility to 'internal' or 'protected private'|
139
+
|[Compiler Error C2577](compiler-error-C2577.md)|'*identifier*': a destructor/finalizer cannot have a return type|
140
+
|Compiler Error C2578|'*class*': type cannot have a 'protected' or 'protected public' constructor|
141
+
|[Compiler Error C2579](compiler-error-C2579.md)|unable to resolve type *type* (*offset*). It is expected in *filename*|
142
+
|Compiler Error C2580|'*identifier*': multiple versions of a defaulted special member functions are not allowed|
143
+
|[Compiler Error C2581](compiler-error-C2581.md)|'*type*': static 'operator =' function is illegal|
144
+
|[Compiler Error C2582](compiler-error-C2582.md)|'operator *operator*' function is unavailable in '*type*'|
145
+
|[Compiler Error C2583](compiler-error-C2583.md)|'*identifier*': 'const/volatile' 'this' pointer is illegal for constructors/destructors|
146
+
|[Compiler Error C2584](compiler-error-C2584.md)|'*class*': direct base '*base_class2*' is inaccessible; already a base of '*base_class1*'|
147
+
|[Compiler Error C2585](compiler-error-C2585.md)|explicit conversion to '*type*' is ambiguous|
|[Compiler Error C2587](compiler-error-C2587.md)|'*identifier*': illegal use of local variable as default parameter|
150
+
|[Compiler Error C2588](compiler-error-C2588.md)|'::~*identifier*': illegal global destructor/finalizer|
151
+
|[Compiler Error C2589](compiler-error-C2589.md)|'*identifier*': illegal token on right side of '::'|
152
+
|Compiler Error C2590|'*identifier*': only a constructor can have a base/member initializer list|
153
+
|Compiler Error C2591|ExclusiveTo cannot use '*type*' as an argument. Only a 'ref class' is a valid argument|
154
+
|[Compiler Error C2592](compiler-error-C2592.md)|'*class*': '*base_class2*' is inherited from '*base_class1*' and cannot be re-specified|
155
+
|[Compiler Error C2593](compiler-error-C2593.md)|'operator *identifier*' is ambiguous|
156
+
|[Compiler Error C2594](compiler-error-C2594.md)|'*operator*': ambiguous conversions from '*type1*' to '*type2*'|
157
+
|Compiler Error C2595|'*identifier*' A WinRT attribute type must be sealed|
158
+
|Compiler Error C2596|'*identifier*' A WinRT attribute field can only be a 'public enum class', 'int', 'unsigned int', 'bool', 'Platform::Type', 'Platform::String' or 'Windows::Foundation::HResult'|
159
+
|[Compiler Error C2597](compiler-error-C2597.md)|illegal reference to non-static member '*identifier*'|
160
+
|[Compiler Error C2598](compiler-error-C2598.md)|linkage specification must be at global scope|
161
+
|[Compiler Error C2599](compiler-error-C2599.md)|'*identifier*': the forward declaration of a managed/WinRT enum is not allowed|
0 commit comments