Message from C, C++ discussions

November 2019

— 😂

— 

int ArrayMemberTotal;
top :
;
StringorInt choice = Choose();


while(choice == 'S' || choice == 'I' ){
goto Here;
}

while(choice != 'S' || choice != 'I' ){
not_An_Option();
goto top;
}

Here :
;

— Goto...

— Can i do something like this , choice is an enumeration with the alias StringorInt, that the choose function returns , and stores to choice

Message permanent page

— Yea i know lol

— Don't use it, why would you? There surely is a better way to do it

— My goal is to take a user input, if the user chooses something that is not an option, they say that is not an option and then ask the same question again

Message permanent page

— Can you give me an idea of a better way to achieve this

— I really don't know what you want to do, so no idea

— 

StringorInt Initial_Questions(void){
clearScreen();
char SorI;

puts("Do you want to create a String or an Integer Array?\n");
puts("Type I for an Integer Array or S for string Array\n");
scanf(" %c", &SorI);

switch(SorI){

case 'S':
return aSTRING;
break;

case 'I':
return INTEGAR;
break;
}

}

Message permanent page

— Lets say i have a function like this that returns an enumeration , what would be the return value for the default case in the switch

Message permanent page

— Still no idea