分享一下我老师大神的人工智能教程!零基础,通俗易懂!http://blog.csdn.net/jiangjunshow
也欢迎大家转载本篇文章。分享知识,造福人民,实现我们中华民族伟大复兴!
#include <iostream>#include <string>#include <algorithm>#include <vector>using namespace std;int main(int argc, char* argv[]){ vector <string> vTest; vTest.push_back( "a "); vTest.push_back( "b "); vTest.push_back( "c "); vTest.push_back( "d "); swap(vTest[0], vTest[3]); vector <string> ::iterator pos; for (pos = vTest.begin(); pos != vTest.end(); pos++) { cout << *pos << endl; } return 0;}