C++/Cli とネイティブの混合プロジェクトがあります。カスタム オブジェクトを作成しましたが、そのオブジェクト タイプのリストを作成したいのですが、うまくいかないようです。コードは次のとおりです。
#pragma once
#include <windows.h>
#include <stdio.h>
#include "..\..\Toolkit\Include\TypeHelper_h.h"
using namespace System;
using namespace System::Runtime::InteropServices;
using namespace System::Threading;
using namespace System::Collections::Generic;
namespace TypeHelperControl {
public ref class MyClass
{
public:
MyClass(){List<TypeVariable^>^ m_someObj;};
~MyClass();
private:
};
public ref class TypeVariable
{
public:
TypeVariable(String^ VariableName,String^ VariableType,String^ VariableValue)
{
this->m_Name = VariableName;
this->m_Type = VariableType;
this->m_Value = VariableValue;
};
String^ get_Name()
{
return m_Name;
}
String^ get_Type()
{
return m_Type;
}
String^ get_Value()
{
return m_Value;
}
private:
String^ m_Name;
String^ m_Type;
String^ m_Value;
};
};
リスト^ m_someObj; 複数のエラーが発生しています
エラー C2059: 構文エラー: '>' エラー C2065: 'VariableType': 宣言されていない識別子 エラー C1004: 予期しないファイルの終わりが見つかりました
ありがとうございました