示例#1
0
 /*
  * Allocates a new contact and returns it
  * */
 static Contact create_contact(string firstName, string lastName, string Adress, string phoneNumber)
 {
     Contact new_contact = new Contact();
     new_contact.firstName = firstName;
     new_contact.lastName = lastName;
     new_contact.adress = Adress;
     new_contact.phoneNumber = phoneNumber;
     return new_contact;
 }
示例#2
0
 /*
  * Add a new contact to the "database" array
  * incrementing the INDEX variable to keep track of number of contacts
  * */
 static void add_contact(Contact contact)
 {
     Contacts[INDEX++] = contact;
 }