Message from C, C++ discussions

November 2019

— Ya

— 

Not sure what you are trying to do, but depending on the condition, make a call to another function
If you need to check the same condition multiple times use a loop

— It is not a call back

— Could you elaborate please

— I will show you

— Okay

— 

ArrayData choose_Array_Member_Amount(InitialQuestionP Choose){

int ArrayMemberTotal;
int blue;
StringorInt choice = Choose();
ArrayData Array_Data;//1
Array_Data.chooseStringorInt = choice;

clearScreen();
switch(choice){

case INTEGAR:
puts("How many members do you need in your Integer Array?\n");
break;

case aSTRING:
puts("How many members do you need in your String Array?\n");
break;
}

blue = scanf(" %d", &ArrayMemberTotal);

switch(blue){


case 1:
Array_Data.ArrayMemberTotal = ArrayMemberTotal;
return Array_Data;
break;


default:
break;
}
}

Message permanent page

— This is an function with the return type of a structure i created

— The parameter is a typedef to a function

— Pointer

— It calls that function and stores what that function returns which is an enumeration symbol i created , either aSTRING or INTEGAR

Message permanent page

— Based on those options, it will print one of two statements