记录详情

Compile Error

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

自豪的采用 HydroJudger 进行评测(github.com/hydro-dev/HydroJudger)

信息

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