我有以下代码用于C ++中的链表实现:(仅Node Class)
template <class, type>
class node<type> {
private:
type data;
node<type> *next;
};
并且我已经将其转换为C#:
class Node<Type>
{
internal Type data;
internal Node<Type>* next;
public Node(Type d)
{
data = d;
next = null;
}
};
在此行:
internal Node<Type>* next;
出现此错误:
cannot take the address of, get the size of, or declare a pointer to a managed type('Node<Type>')
出什么问题了?
非常感谢。