I am trying to get the number of objects present in an array of objects, but it fails everytime. The code is as below:
here im trying to do the for loop without using the variable 'units'.
1 2 3 4 5 6 7 8 9 10 11
cout<<"\n\nHow many personal records would you like to create: ";
cin >>records;
clsPeople *objPersons = new clsPeople [units];
for(i=0;i<siezeof(*objPersons)/sizeof(clsPeople);i++)
{
cout<<"\n\nPlease enter the program details for the program "
<<i+1<<endl;
objPersons [i].setNewPersonDetails();
}