Change this:
Code:
void getlabs(int& lab1, int& lab2, int& lab3, int& lab4, int& lab5, int& lab6, int& lab7, float& labtotal);
To this:
Code:
void getlabs(int lab1, int lab2, int lab3, int lab4, int lab5, int lab6, int lab7, float labtotal);
Because you're not sending an address of anything, you're sending the the whole integer. If you want to pass the labs in as reference then go like this:
Code:
void getlabs(int *lab1, int *lab2, int *lab3, int *lab4, int *lab5, int *lab6, int *lab7, float *labtotal)
{
scanf("%d %d %d %d %d %d %d", &lab1, &lab2, &lab3, &lab4, &lab5, &lab6, &lab7);
labtotal = (float)(lab1 + lab2 + lab3 + lab4 + lab5 + lab6 + lab7);
labtotal = labtotal * 1.0714;
}
Code:
getlabs(&lab1, &lab2, &lab3, &lab4, &lab5, &lab6, &lab7, &labtotal);
You see, the & is saying: Get the address
The * is saying: Receive as an address
I hope this helps you!