I'm having some problems dynamically changing the size of stucts. I know there must be a way to do it...but I guess it must be a bit different than with standard variables.
I'll put up some code, maybe I'm just being dumb ;)
struct SScore
{
char m_szFirstName[15];
char m_szLastName[15];
int m_Score;
};
//const TOTAL = 25;
int main()
{
SScore Golfers[1];
SScore* pGolfers[1];
int i = 0,
iTotal = 0;
cout << "\nEnter number of golfers: ";
cin >> iTotal;
Golfers = new (nothrow) SScore[iTotal] ;
theres alot more to the program, but this is where the error is occuring, so the rest is a bit reduntant. Any help would be greatly appreciated!!