hi im struggeling with some database software its really siplified but im trying to get multipul entries

better to show you

Code:
 void people::enter(int i) 
   {
    char a == "y"; 
	 while (a = "y"); 
	   { 
	    cout << "Enter the name of the person ";
	     gets(np[i].name);
        cout << "Enter the phone number of the person ";
	     gets(np[i].phone);
		cout << "Enter the full address of the person ";
		 gets(np[i].address); 
		cout << "Enter the Email address of the person";
		 gets(np[i].email);
		cout << "Enter the political party the person belongs to (conservative, labour, liberal, other)";
		 gets(np[i].party);
		
		cout << "Do you wish to enter another member ? (y/n)";
		cin  >> a;
		}
	}
	// end of enter member function
k this is the add member function
previously we were given a program which allowed two instances and the function had no loop

so in the main previously we used
Code:
  tdata.enter(0);
  tdata.enter(1);
this worked for two but how can i link this call fuction to my loop so i can have an infinet number of entries.