I was wondering how to pass a struct array by reference into a function. I found how to do it with pointers but wanted to learn with references too. Here is my code thus far.
struct employeeType
{
string firstName;
...
double monthlyBonus;
};
void readEmpData(ifstream& infile, employeeType *emp, int length);
I thought I just did employeeType& emp or employeeType& emp[] but get errors and everything I have googled just did pointers.
Here is the full code at pastebin for clarification for my learning experiment: http://pastebin.com/6NfZ3LC4