Message from C, C++ discussions
November 2019
— 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;
}
}
— 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
— Still no idea
— Its a function that ask user if they want to make a string or integar array, Press I for int and S for string
— That character is stored in the SorI variable, which is passed in a switch
— Pass out of the two values in this enum
typedef enum{aSTRING,INTEGAR}StringorInt;
— My question is just about the default case in the switch statement
—
do{
scanf("%c", &SorI);
switch(SorI){
case 'S':
return aSTRING;
case 'I':
return INTEGAR;
} while(true);
— While(?)
— Gays plz HELP me
— I want to sort struct by the alphabet, but I made a mistake somewhere and I don`t know where