Message from C, C++ discussions
November 2019
— So i think i understand better what question i trying to ask , i trying to understand the behavior , like why does it a function that is lexically within the “parent” function if you havent even completed steps in the “child” function that iis currently taking user input
Ensure that user either entered valid data or wants to quit. In your case check if all scanf calls are checked for zero return
— Rewrite this message using function names from your code
— Ok
— Create_Array -> choose_Array_Member_Amount -> Initial_Questions
— That is the follow of how they are called
— Each function calls the next function in the very beginning of the function
— So the user first sees the questions of the last function , Initial question first , since choose array member amount is dependent on what is returned by initial question , and the create array function is dependent on what is returned from choose_Array_Member_Amount
— So i see the intial questions first, asks you if you want to make a string or int array, lets say i choose int , it then returns that data to the next function
— If i enter a wrong input it uses the default case, which calls the “function X” which in this case is the not an option () funciton which just displays a timed error message and clears the screen , then it makes use of recursion all calls itself again , to re ask the question
— Up to this point it works fine
— Its when it collects that data and passes it to the next function where the program gets weird