依旧是用的指针数组解的这道题,话不多说直接上代码。
#include<iostream>
#include<cstdlib>
using namespace std ;
typedef struct Word {
char a ;
struct Word * next ;
} word;
int inputList(word * list) {
char a = 'a' ;
int n = 0 ;
while(1) {
scanf("%c" , &a) ;
if(a == '\n')
<