submition2

This commit is contained in:
kr820js 2024-03-23 18:21:21 +01:00
parent 58039d83f5
commit 0fa7d5d8f7

View File

@ -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;