m*********a 发帖数: 3299 | 1 void reverseWords(char *s) {
struct strStack{
char str[80];
struct strStack *next;
};
struct strStack *root,*tmp;
root=NULL;
int i;
while (*s!='\0'){
while (*s==' ') s++;
if (*s=='\0') break;
if (root==NULL){
root=malloc(sizeof(struct strStack));
root->next=NULL;
}
else {
tmp=malloc(sizeof(struct strStack));
... 阅读全帖 |
|