C++ 字符串类型问题
#include "stdafx.h"#include < vector >#include < string >#include < iostream >using namespace std;struct Str{ char name1[100]; char name2[100];};void HandleStr( vector<Str*>&strTest ,string &outStr ){ string temp; for( vector<Str*>::iterator it = strTest.begin(); it != strTest.end(); ++it ) { if( it == strTest.begin() ) { temp = (*it)->name1 + " = '"+ (*it)->name2 + "'"; outStr += temp; } else { temp = " and " + (*it)->name1 + " = '"+ (*it)->name2 + "'" outStr += temp; } }}(*it)->name1