看板 Programming 關於我們 聯絡資訊
※ 引述《StubbornLin.bbs@ptt.cc (Victor)》之銘言: > ※ [本文轉錄自 C_and_CPP 看板] > 作者: StubbornLin (Victor) 看板: C_and_CPP > 標題: [問題] gc++ template的問題 > 時間: Wed Jun 7 08:41:34 2006 > #pragma once > #include "ClientOfServer.h" > #include <list> > #include <iterator> > using namespace std; > template<class SI> > class CServer : public CEventInterface{ > public: > CServer() > {} > virtual ~CServer(){ > } > // update socket state > virtual void Update(){ > list<CClientOfServer<SI> *>::iterator i = m_ClientList.begin(); 在 list<> 前面加上 typename 看看。 -- Life sucks, but so does death. -- ︵︵ █▔◣ █▔█ █▔▔ █▔█ █▆▉ █ █▔█ █◣█ █▔ █◣︵︵ █ █ █▁◤ █▁▁ █▁█ ▉▉▉ █ █▁█ █◥█ █ █ 夢之大地 逼逼ㄟ四 █▁◤ █ █ █▁▁ █ █ ▉▉▉ █▁ █ █ █ █ █▁◤ ※ Origin: <bbs.ccns.ncku.edu.tw> ◆ From: 140.116.143.168