I get a C ++ / CLI array type, no error is made here when using an array type in a class. First, I created a console application in Visual Studio 2013 and added a new class, "MainClass". Then I added a new method. The thing is, I used an array in the same project in the main cpp file without classes without problems, and it looks like it is used in the same way in this example . Here is MainClass.h:
#pragma once #using <System.dll> #using <System.Security.dll> #include <windows.h> using namespace System; using namespace System::Security; using namespace System::Security::Cryptography; using namespace System::Security::Cryptography::X509Certificates; using namespace System::IO; using namespace System::Collections::Generic; ref class MainClass { public: MainClass(); bool Verify(array<System::Byte> DataToVerify); };
MainClass.cpp:
#include "MainClass.h" #using <System.dll> #using <System.Security.dll> #include <windows.h> using namespace System; using namespace System::Security; using namespace System::Security::Cryptography; using namespace System::Security::Cryptography::X509Certificates; using namespace System::IO; using namespace System::Collections::Generic; MainClass::MainClass() { } bool MainClass::Verify(array<System::Byte> DataToVerify) { return false; }
user4469411
source share