// // Created by caleb on 3/25/24. // #ifndef STRUCTURES_H #define STRUCTURES_H #include struct Employee { Employee( char * pName, double salary); Employee( char * pName, char * pAddress, char nameOfSpouse[50], double salary); ~Employee(); Employee &operator=(const Employee &rhs); Employee(const Employee &rhs); Employee &operator=(Employee &&rhs); Employee(Employee &&rhs); char * pName; char * pAddress; char nameOfSpouse[50]; double salary; std::string toString(); }; /** Populates a dynamic 2D array of employees by reading the data from the console. * * @param pp existing 2D array to be populated. * @param rows number of rows * @param col number of columns */ void populate(Employee **pp, int rows, int col ); /** Prints the 2D dynamic array. * * @param pp the dynamic array * @param rows number of rows * @param col number of columns */ void print(Employee **pp, int rows, int col ); /** Frees all memory occupied by the array. * * @param pp the dynamic array * @param rows number of rows * @param col number of columns */ void free(Employee **pp, int rows, int col); /**Sorts the dynamic array in ascending order by name. * * @param pp the dynamic array * @param rows number of rows * @param col number of columns */ void sort(Employee **pp, int rows, int col ); #endif /* STRUCTURES_H */