记录详情

Compile Error

/in/foo.cc:7:48: warning: friend declaration 'std::istream& operator>>(std::istream&, Array<T>&)' declares a non-template function [-Wnon-template-friend]
  friend istream& operator>>(istream&, Array<T>&);
                                                ^
/in/foo.cc:7:48: note: (if this is not what you intended, make sure the function template has already been declared and add <> after the function name here) 
/in/foo.cc:8:48: warning: friend declaration 'std::ostream& operator<<(std::ostream&, Array<T>&)' declares a non-template function [-Wnon-template-friend]
  friend ostream& operator<<(ostream&, Array<T>&);
                                                ^
/tmp/ccEs06hw.o: In function `main':
foo.cc:(.text.startup+0x26): undefined reference to `operator>>(std::istream&, Array<int>&)'
foo.cc:(.text.startup+0x35): undefined reference to `operator<<(std::ostream&, Array<int>&)'
collect2: error: ld returned 1 exit status

信息

递交者
类型
自测
题目
P1011 数组类模版Array[综合题]
语言
C++
递交时间
2020-04-03 17:16:34
评测时间
2020-04-03 17:16:34
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes