Can't display a string from an array of strings : When i press button VK_LEFT / VK_RIGHT nothing happens, why??? I would like it to print the next string in the array but it won't do it for some reason!!! what am i doing wrong here? thanks for anyone helping me out here!



```
int TotalItems = 0, IntForItem = 0;

struct Item
{
	int * Index;
	std::string* stringArray = new std::string[3];
};

Item item[120];

int AddNewItem(int i, int * Index, std::string stringarray[])
{
	item[i].Index = Index;
	item[i].stringArray = stringarray;
	return (i + 1);
}

void GetItems() 
{
	int i = 0;

	std::string * test = new std::string[3]{ "hi", "and", "bye" };

	i = AddNewItem(i, &IntForItem, test);

	TotalItems = i;
}

int main()
{
	GetItems();

	while (true)
	{
		system("CLS");

		std::cout << item[0].stringArray[*item[0].Index].c_str() << std::endl;

		while (true)
		{
			if (GetAsyncKeyState(VK_LEFT))
				*item[0].Index -= 1;
			
			else if (GetAsyncKeyState(VK_RIGHT))
				*item[0].Index += 1;
		}
	}

	Sleep(1);
	return 0;
}
```