#include<iostream>
#include<limits>
using namespace std;
struct Player
{
string name;
string hometown;
int age;
int numGames;
};
int main()
{
int esportsPlayers;
cout<<"How many esports players are there at TTU who major in CSC? \n";
cin>>esportsPlayers;
struct Player* arr=new Player[esportsPlayers];
int **hours=new int*[esportsPlayers];
int *totalHours=new int[esportsPlayers];
cout << "Please enter in information about each player: \n\n";
for(int i=0;i<esportsPlayers;i++)
{
cout<<"Player "<< i + 1 <<" :\n";
cout << "\tName:\t"; > my issue is that it skips these two lines
getline(cin,arr[i].name);
cout << "\tHometown:\t";
getline(cin,arr[i].hometown);
cout<<"\tAge:\t";
cin>>arr[i].age;
cout<<"\tHow many games does "<<arr[i].name<<" play?\t";
cin>>arr[i].numGames;
When the code runs smoothly but the problem is that it skips over where it outputs "Name:" and takes in the user input and goes straight to asking the next line which is asking for the hometown. It does this with every player.