I think it's okay now.
Code:
#include <iostream>
#include <string>
#include <cstring>
#include "../Headers/golf.h"
int main()
{
using std::cout;
using std::cin;
using std::strlen;
using std::string;
using sport::showgolf;
using sport::setgolf;
using sport::golf;
string fullname;
int players, handicap;
cout << "How many players are playing? ";
while(!(cin >> players))
{
cin.clear();
while(cin.get() != '\n')
continue;
cout << "Please enter how many players are playing: ";
}
golf *golfers = new golf[players];
for(int i = 0; i < players; i++)
{
cout << "Enter your full name: ";
cin >> fullname;
cin.ignore(sizeof(fullname), '\n');
cout << "Enter the handicap: ";
(cin >> handicap).get();
setgolf(golfers[i], fullname, handicap);
}
for(int i = 0; i < players; i++)
{
showgolf(golfers[i]);
}
delete [] golfers;
}