Compiler Error C3698
Visual Studio 2015
The new home for Visual Studio documentation is Visual Studio 2017 Documentation on docs.microsoft.com.
The latest version of this topic can be found at Compiler Error C3698.
type' : cannot use this type as argument of 'operator'
A managed object was declared incorrectly.
The following sample generates C3698:
// C3698.cpp
// compile with: /clr
int main() {
array<int>^a = new array<int>^(20); // C3698
array<int>^a2 = gcnew array<int>(20); // OK
}
Show: