/* * 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; }
/* * 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; }