std::vector<node> retrieve_path(node goal, search_set * closed){ node current=goal; std::vector<node> return_list(1,goal); while(current.came_from[0]!=NO_VAL){ current=(*closed).pop_requested(current.came_from); return_list.push_back(current); } return return_list; }
int main() { char str[] = "Name=Liunx=dsfas=adsf=dsf=asdf=asdf=asdf=sadf=asdf=as=df=asdf=as"; char split[] = "="; char **ptr; int i; ptr = return_list(str, split); // The first string is a keyword // and the left is values for (i = 0; ptr[i] != NULL; i++) { printf("%s\n", ptr[i]); } free(ptr); return 0; }