I'm just trying to figure out if there is any way i can switch 2 string of characters like numbers with swap function. Somehow, i'm getting application error when trying to sort the characters in alphabetical oder with this:
Am i doing it right or is there anyway i can sort the characters in alphabetical orderCode:vector<char*>Name; //push some char into the vector array .............................. for(int j=1; j<Name.size(); j++) { for(int i=0; i<Name.size()-1; i++) { if( strcmp(Name[i], Name[k]) > 0) { char* temp; strcpy(temp, Name[i]); strcpy(Name[i], Name[k]); strcpy(Name[k], temp); } } }



LinkBack URL
About LinkBacks


