initialize a string array, set the size as nSize, the value of all strings as strDefault.
void init_vector_string( vector<string> & vsEmptyVec, int nSize, string strDefault = "" )
EX1
void init_vector_string_ex1() { vector<string> vsEmptyVec(5); int nSize=4; string strDefault = "China"; init_vector_string(vsEmptyVec, nSize, strDefault); for(int ii=0; ii<vsEmptyVec.GetSize(); ii++) printf("%s\n",vsEmptyVec[ii]); printf("end"); }
origin.h