我的代码中出现以下错误。我对 C++ 很生疏,不知道我做错了什么。
错误信息:
Error: Field has incompatible type 'int []'
代码:
template<typename Comparable> class OrderedCollection
{
private:
Comparable data[]; //ERROR CAUSED BY THIS LINE
int _size;
int _current;
const int MAX_SIZE = 100;