submition2
This commit is contained in:
parent
58039d83f5
commit
0fa7d5d8f7
@ -29,12 +29,12 @@ int main()
|
||||
return 0;
|
||||
}
|
||||
|
||||
int reading_strings_and_storing_them_in_memory(link* pointer_to_start_of_chain){
|
||||
void reading_strings_and_storing_them_in_memory(link* pointer_to_start_of_chain){
|
||||
link* next_link = pointer_to_start_of_chain;
|
||||
char buffer[SIZE];
|
||||
link* ancestor=NULL;
|
||||
while(1){
|
||||
if(fgets(buffer, SIZE, stdin)==NULL){
|
||||
if(fgets(buffer, SIZE, stdin)==NULL||buffer[0]=='\n'){
|
||||
if(ancestor!=NULL){
|
||||
free(ancestor->p_na_next_struct);
|
||||
ancestor->p_na_next_struct=NULL;
|
||||
|
Loading…
Reference in New Issue
Block a user