void BogglePlayer::allPostfix(TST &t){ preMode=false; for (map<int, Vertex*>:: iterator itr=g.work.begin(); itr!=g.work.end(); itr++){ itr->second->name=revStr(itr->second->name); } //allPrefix(rlextst); for (map<int, Vertex*>::iterator itr=g.work.begin(); itr!=g.work.end(); itr++){ itr->second->name=revStr(itr->second->name); } }
void revWords(char *str) { int i = 0, j = 0; revStr(str,strlen(str)); while(1) { if(*(str+j)==' '||*(str+j)=='\0') { revStr( str+i,j-i); i = j+1; } if(*(str+j)=='\0') break; j++; } }
int main () { printf ("\nHello world .. !! \n"); char arr[10] = "Atul"; revStr (arr); return EXIT_SUCCESS; }