如何在函数参数中传递链表(STL)
pgood 2002-09-24 04:49:07 最近编写一程序,要在函数参数中传递链表,但不知该如何写函数原型
如何在函数参数中传递链表
....
#include<list>
void OnButton1()
{
using namespace std;
list<int> nList;
for(int i=0;i<10;i++)
nList.push_back(i);
Display(nList);
}
void Display(list<int> &nList)//错误 ????该 如何写
{
}