argument in a switch

I'm trying to call a function in a switch, but I'm not sure which arguments to call. The problem is in the int main() function at the bottom


I've tried adding arguments for both the memberInfo and dvdMovie structures because the char are being compared to them respectively.
Last edited on
Arguments are not called. The function currently takes only 3 arguments. The commented out call is trying to pass 4 which obviously makes no sense. 3 != 4. The arrays appear to have the same size therefore you only need to pass one number to the function that indicates this.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
switch(choice){
    	    case 1:
	    //....
	    case 2:
	    //....
	    case 3:
//Problem>> rentMovie(SIZE, numberOfItems, numberOfUsers);
	    cout<<"\n";
	    break;
	    case 7:
	    break;
	}
	    //Clears everything but menu on screen
	    system("PAUSE");
	    system("CLS");
    }
	return 0;
}


I tried using the const int SIZE, but it didn't work. It says:
error C2664: 'rentMovie' : cannot convert parameter 1 from 'const int' to 'memberInfo []' 333
Last edited on
The arguments passed must be the same number and the same type as the function parameters
I changed all of the char arrays to have the same size, but I'm still getting the same result.
Topic archived. No new replies allowed.