【发布时间】:2013-09-08 15:20:27
【问题描述】:
我正在尝试重载赋值运算符,并不断收到以下错误:
StackLinked& operator=(const StackLinked& other);
template<typename DataType>
StackLinked<DataType> StackLinked<DataType>::StackLinked& operator=(const StackLinked& other)
错误:警告 C4346:“StackLinked::{ctor}”:依赖名称不是类型
知道如何解决这个问题吗?我无法编辑标题部分,只能编辑实现。
【问题讨论】:
-
显示足够多的类定义,我们可以看到第一行在 inside 它,它是一个模板。
标签: c++ overloading