howdy,
i understand that goto is to be avoided so in the following switch what is the proper way of getting back to case'y' without starting the complete switch over again?
Code:
switch(pick){
case 'm':
case 'M':
{answer = static_cast <int> (rand())%high_range;}
break;
case 'y':
case 'Y':
enter: //<<<<--------------------------
cout<<"Enter a number"<<endl;
cin>>hi_range;
if(!IsIntt (hi_range)){ //check for int
cout<<"Must be an integer"<<endl;
goto enter;} //<<<<------------------
else
high_range = atoi (hi_range);
cout<<"hi: "<<hi_range<<"high: "<<high_range<<endl;
break;
};
thanks
M.R.