Hey guys im getting an Infinite Loop and i cannot figure out the problem here is how the code goes.
It wont stop printf enter choice: please enter anouther choice.Code:int endflag=0; int choice; while( endflag ==0) { printf("enter choice\n"); scanf("%d", choice); switch(choice) { case 1: /* function call */ break; case 2: /* another function call */ break; case 3: printf(".....") endflag =1; break; default: printf("please enter anouther choice") break; } }
Any ideas,
Chris
edit! sorry it was set as zero. Its fine until the default case.