C++ STL中的一个问题
#include"algostuff.hpp"
using namespace std;
int main()
{
vector<int> coll;
INSERT_ELEMENTS(coll,1,3);
PRINT_ELEMENTS(coll,"on entry:");
while(next_permutation(coll.begin(),coll.end()))
{
PRINTIELEMENTS(coll," ");
}
PRINT_ELEMENTS(coll,"afterwrd:");
while(prev_permutation(coll.begin(),coll.end()))
{
PRINTIELEMENTS(coll," ");
}
PRINT_ELEMENTS(coll,"now:");
while(prev_permutation(coll.begin(),coll.end()))
{
PRINTIELEMENTS(coll," ");
}
PRINT_ELEMENTS(coll,"afterwrd:");
程序来自<<c++标准程序库>>.
我在VC6.0上运行后系统显示: