0
之前我有以下问题,我有一个具有类B实例的类A,而类B具有类A的实例。在VisualStudio 2013中给我提供了错误“错误C2143:语法错误:失踪 ';' '^'之前“下面是班级代码。由于事先错误C2143:语法错误:缺少';'在'^'
#include "stdafx.h"
#include "BAsterNode.h"
using namespace System;
using namespace System::Collections::Generic;
ref class BAsterInfo
{
private:
IComparable^ info;
BAsterNode^ enlaceMayores; /* error C2143 */
public:
IComparable^ GetInfo();
void SetInfo(IComparable^);
BAsterNode^ GetEnlaceMayores();
void SetEnlaceMayores(BAsterNode^ enlaceMayoresP);
};
和第其它类
#include "stdafx.h"
#include "BAsterInfo.h"
using namespace System;
using namespace System::Collections::Generic;
ref class BAsterNode
{
private:
BAsterNode^ enlaceMenores;
List<BAsterInfo^>^ listaInformacion;
int Find(BAsterInfo^ info);
public:
List<BAsterInfo^>^ GetListaInfo();
void SetListaInfo(List<BAsterInfo^>^ listaInfoP);
BAsterNode^ GetEnlaceMenores();
void SetEnlaceMenores(BAsterNode^ enlaceMenoresP);
};