Compiler errors C3300 Through C3399

The articles in this section of the documentation explain a subset of the error messages that are generated by the compiler.

Important

The Visual Studio compilers and build tools can report many kinds of errors and warnings. After an error or warning is found, the build tools may make assumptions about code intent and attempt to continue, so that more issues can be reported at the same time. If the tools make the wrong assumption, later errors or warnings may not apply to your project. When you correct issues in your project, always start with the first error or warning that's reported, and rebuild often. One fix may make many subsequent errors go away.

To get help on a particular diagnostic message in Visual Studio, select it in the Output window and press the F1 key. Visual Studio opens the documentation page for that error, if one exists. You can also use the search tool at the top of the page to find articles about specific errors or warnings. Or, browse the list of errors and warnings by tool and type in the table of contents on this page.

Note

Not every Visual Studio error or warning is documented. In many cases, the diagnostic message provides all of the information that's available. If you landed on this page when you used F1 and you think the error or warning message needs additional explanation, let us know. You can use the feedback buttons on this page to raise a documentation issue on GitHub. If you think the error or warning is wrong, or you've found another problem with the toolset, report a product issue on the Developer Community site. You can also send feedback and enter bugs within the IDE. In Visual Studio, go to the menu bar and choose Help > Send Feedback > Report a Problem, or submit a suggestion by using Help > Send Feedback > Send a Suggestion.

You may find additional assistance for errors and warnings in Microsoft Learn Q&A forums. Or, search for the error or warning number on the Visual Studio C++ Developer Community site. You can also search Stack Overflow to find solutions.

For links to additional help and community resources, see Visual C++ Help and Community.

Error messages

Error Message
Compiler error C3300 'symbol': improper format for IDL 'value'
Compiler error C3301 'coclass': coclass cannot be a 'symbol' interface
Compiler error C3302 'identifier': identifier has more than number characters
Compiler error C3303 'attribute': attribute can only be used on 'type'
Compiler error C3304 Obsolete.
Compiler error C3305 Obsolete.
Compiler error C3306 'template': unnamed class template/generic is not allowed
Compiler error C3307 'module': unable to create IDL module
Compiler error C3308 'function': direct call through imported class is not supported
Compiler error C3309 'macro/keyword': module name cannot be a macro or a keyword
Compiler error C3310 'identifier': module name conflict
Compiler error C3311 module attribute must be defined at global scope
Compiler error C3312 no callable 'identifier' function found for type 'type'
Compiler error C3313 'identifier': variable cannot have the type 'type'
Compiler error C3314 'symbol': not a supported IDL module type
Compiler error C3315 'function': must be a member function
Compiler error C3316 'type': an array of unknown size cannot be used in a range-based for statement
Compiler error C3317 'identifier': an overload function cannot be used as the expression in a range-based for statement
Compiler error C33181 'type': an array cannot have an element type that contains 'auto'
Compiler error C3319 Obsolete.
Compiler error C3320 'type': type cannot have the same name as the module 'name' property
Compiler error C3321 an initializer list is unexpected in this context
Compiler error C3322 'property': is not a valid property for attribute 'attribute'
Compiler error C3323 'alignas' and '__declspec(align)' are not allowed on function declarations
Compiler error C3324 'property': property occurs more than once in attribute 'attribute'
Compiler error C3325 'attribute': attribute has too many arguments
Compiler error C3326 'value': is not a valid value for property 'property' of attribute 'attribute'
Compiler error C3327 'property': must specify value for property of attribute 'attribute'
Compiler error C3328 'attribute': attribute does not have enough arguments
Compiler error C3329 syntax error: expected 'token1' not 'token2'
Compiler error C3330 ' function': a function cannot return an array 'type'
Compiler error C3331 'identifier': attributes on parameters are only allowed on COM interfaces and coclasses
Compiler error C3332 'property': grammar inconsistent, property 'property' is both required and has a default
Compiler error C3333 'library': cannot #import corrupt type library
Compiler error C3334 cannot #import corrupt type library
Compiler error C3335 'identifier': There can be at most one default interface for a coclass 'class'
Compiler error C3336 This operation must be performed at class scope
Compiler error C3337 'identifier': defaultvtable must be an event source for a coclass 'class'
Compiler error C3338 'identifier': There can be at most one default interface that is also an event source for a coclass 'class'
Compiler error C3339 template parameter requires either 'class' or 'typename' after the parameter list
Compiler error C3340 'identifier': interface cannot be both 'restricted' and 'default' in coclass 'class'
Compiler error C3341 'interface': a defaultvtable interface must be either 'dual' or 'custom'
Compiler error C3342 'identifier': ambiguous attribute
Compiler error C3343 'class::name': attribute identifier has too many characters
Compiler error C3344 you cannot define an explicit specialization nor a partial specialization of 'symbol'
Compiler error C3345 'name': invalid identifier for module name
Compiler error C3346 exported declaration at non-namespace scope
Compiler error C3347 'argument': required argument is not specified in attribute attribute-name
Compiler error C3348 exported templates are not part of the current C++ standards
Compiler error C3349 'class::member': multicast attribute has already been implemented by provider provider-name
Compiler error C3350 'function': a delegate constructor expects number argument(s)
Compiler error C3351 'function': if you pass a NULL object instance to a delegate constructor you must also pass the address of a static member function
Compiler error C3352 'function': the specified function does not match the delegate type 'type'
Compiler error C3353 'identifier': a delegate can only be created from a global function or a member function of a managed/WinRT type
Compiler error C3354 'identifier': the function used to create a delegate cannot have return type 'type'
Compiler error C3355 'class::member': multicast attribute listens to provider 'provider1', but is implemented by provider 'provider2'
Compiler error C3356 'identifier': cannot call a multicast attribute with a fully qualified name
Compiler error C3357 'attribute': attribute is ambiguous, must use fully qualified name
Compiler error C3358 'symbol': symbol not found
Compiler error C3359 'specialization': cannot specialize template
Compiler error C3360 'string': cannot create name
Compiler error C3361 there is no context in which to action
Compiler error C3362 'class::member': multicast attribute has not been implemented
Compiler error C3363 'identifier': 'typeid' can only be applied to a type
Compiler error C3364 ' function': invalid argument for delegate constructor; delegate target needs to be a pointer to a member function
Compiler error C3365 operator 'operator': differing operands of type 'type' and 'type'
Compiler error C3366 'member': static data members of managed/WinRT types must be defined within the class definition
Compiler error C3367 ' function': cannot use static function to create an unbound delegate
Compiler error C3368 'declarator': invalid calling convention for IDL
Compiler error C3369 'module': idl_module already defined
Compiler error C3370 'module': idl_module not yet defined
Compiler error C3371 'idl_module': only the 'name' property is allowed here
Compiler error C3372 must specify at least 1 interface for attribute 'attribute' on a coclass
Compiler error C3373 attribute 'attribute' takes no arguments except on a coclass
Compiler error C3374 can't take address of ' function' unless creating delegate instance
Compiler error C3375 'function': ambiguous delegate function
Compiler error C3376 'template': only static data member templates are allowed
Compiler error C3377 'decltype(auto)' is not allowed in a new-expression (Obsolete in Visual Studio 2022.)
Compiler error C3378 a declaration can be exported only from a module interface unit
Compiler error C3379 'class': a nested class cannot have an assembly access specifier as part of its declaration
Compiler error C3380 'specifier': invalid assembly access specifier - only 'public' or 'private' are allowed
Compiler error C3381 'specifier': assembly access specifiers are only available in code compiled with a /clr option
Compiler error C3382 'sizeof' is not supported with /clr:safe
Compiler error C3383 'operator new' is not supported with /clr:safe
Compiler error C3384 'type': the value constraint and the ref constraint are mutually exclusive
Compiler error C3385 ' function': a function that has a DllImport custom attribute cannot return an instance of a class
Compiler error C3386 'type': __declspec(dllexport)/__declspec(dllimport) cannot be applied to a managed/WinRT type
Compiler error C3387 'member': __declspec(dllexport)/__declspec(dllimport) cannot be applied to a member of a managed/WinRT type
Compiler error C3388 'token': not allowed as a constraint, assuming 'value' to continue parsing
Compiler error C3389 __declspec(specifier) cannot be used with /clr:pure or /clr:safe
Compiler error C3390 'type': invalid type argument for generic parameter 'parameter' of generic 'generic_type', must be a reference type
Compiler error C3391 'type': invalid type argument for generic parameter 'parameter' of generic 'generic_type', must be a non-nullable value type
Compiler error C3392 'type': invalid type argument for generic parameter 'parameter' of generic 'generic_type', must have a public parameterless constructor
Compiler error C3393 syntax error in constraint clause: 'identifier' is not a type
Compiler error C3394 syntax error in constraint clause: found 'symbol' expected a type
Compiler error C3395 ' function': __declspec(dllexport) cannot be applied to a function with the __clrcall calling convention
Compiler error C3396 'class.member': custom attribute not found in 'namespace'
Compiler error C3397 Aggregate initialization is not allowed in default arguments
Compiler error C3398 'operator': cannot convert from 'type' to 'type'. Source expression must be a function symbol
Compiler error C3399 'type': cannot provide arguments when creating an instance of a generic parameter

1-No longer emitted in Visual Studio 2022 version 17.11

See also

C/C++ Compiler and build tools errors and warnings
Compiler errors C2000 - C3999, C7000 - C7999