第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

c++ 輸出單鏈表元素

c++ 輸出單鏈表元素

C++
瀟湘沐 2018-08-17 11:14:53
//函數(shù)聲明部分friend ostream& operator<<<>(ostream&,SinglyList<T>&);    //輸出單鏈表所有元素//函數(shù)定義template <class T>ostream& operator<<<>(ostream &out,SinglyList<T> &list){  out<<"(";  for(Node<T> *next=list.head->next; next != NULL; next = next->next)    {      out<<next->data;      if(next->next != NULL)    out<<",";    }  out<<")\n";  return out;}g++ 編譯時報錯:SinglyList.h:64:55: 錯誤:模板標識符‘operator<< <>’出現(xiàn)在基本模板的聲明中 ostream& operator<<<>(ostream &out,SinglyList<T> &list)SinglyList.h:20:19: 錯誤:‘std::ostream& operator<<(std::ostream&, SinglyList<Computer>&)’的模板標識符‘operator<< <>’不匹配任何模板聲明   friend ostream& operator<<<>(ostream&,SinglyList<T>&);    //輸出單鏈表所有元素 這是我在書上看到的代碼,在我的環(huán)境中編譯報錯。首先對于“operator<<<>”這部分中的<>不明白代表什么意思?先謝了。
查看完整描述

1 回答

  • 1 回答
  • 0 關注
  • 819 瀏覽

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網(wǎng)微信公眾號