From 1013f4069f984b14b5f3bdc5792608dd4a0d6da7 Mon Sep 17 00:00:00 2001 From: kr820js Date: Sat, 23 Mar 2024 18:55:17 +0100 Subject: [PATCH] submition5 --- a1/program.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/a1/program.c b/a1/program.c index 33ed988..712e79d 100644 --- a/a1/program.c +++ b/a1/program.c @@ -63,8 +63,8 @@ int reading_strings_and_storing_them_in_memory(link* pointer_to_start_of_chain){ } int analizing_string(char* pointer){ float number1, number2, result3; - - + char buffer_for_token[SIZE]; + strcpy(buffer_for_token,pointer); int counter=0; char operant; int i=0; @@ -82,7 +82,7 @@ int analizing_string(char* pointer){ char delim[] =" +=-*/\n"; - char *first_number_cucumber=strtok(pointer, delim); + char *first_number_cucumber=strtok(buffer_for_token, delim); if(first_number_cucumber==NULL||is_number_question_mark(first_number_cucumber)==0){