Alright in my game there will be a shop but depending how far in the game you are the shop will have different items i have no problem setting this up but where can i place the shop in the code where it takes the latest changes
//example 1
int y = 0;
int x = 0;
if (y = 99)
{
shop:
cout << "Welcome to the shop how can we help you";
if ( x = 1)
{
cout << We have these in stock";
}
else
{
}
}
else
{
}
cout << "this way to shop";
x = 1;
goto shop;
Now my problem is when i use goto it doesn't remember that x is 1 so it wont change anything is there any place i can put the shop (not in the code) where it will remember the last numbers