C/C++の宿題を片付けます 57代目
■ このスレッドは過去ログ倉庫に格納されています
0761デフォルトの名無しさん
2006/01/16(月) 11:34:28int sumlist(std::list<int> &anSrc)
{
std::list<int>::iterator iEnd = anSrc.end();
int nResult = 0;
for (std::list<int>::iterator iProc = anSrc.begin();
iProc != iEnd;
++iProc)
{
nResult += *iProc;
}
return nResult;
}
久しぶりにC++書いたから間違ってても白根
コンパイル環境は脳内g++
■ このスレッドは過去ログ倉庫に格納されています