I'm trying to figure out how to print an enum variable name verses the enum value. currently my code looks something like this. It prints the numeral 0-2 verses the enum that corresponds with the value.
When this prints, the following text is printed:Code:case win: ++*win_cnt_ptr; //printf("%27sYou win.\n", ""); printf("%s%d%s%d%s\n", "You chose ", player_choice, " and I chose ", machine_choice, " You win.\n"); break;
You chose 2 and I choose 1 You win.



LinkBack URL
About LinkBacks


