All rollDice is supposed to do is roll the dice and return nothing. But then in main I have to cout dice1 and dice2's values and add then into TotalDice so that if TotalDice equals to 7 then the user wins.
I used x and y thinking that they would take the value of dice1 and dice2 but that's not working since x and y are not initialized.
Basically you are assigning the value of x to dice1 and the value of y to dice2 then reassigning the values dice1 and dice2 to random numbers. At no point do x or y get assigned any value other than the garbage they originally got when declared. There are a couple different ways to fix it, but you are missing a few other things before you need to worry about that.
thank you Himanshu123 but my professor doesn't want rollDice to return anything, unless I've missread her "The method will take in two int parameters one for each die, but it will not return anything to where it was called."
I haven't had any luck figuring out a way out of this
You can pass the x and y by reference (see the link admkrk posted for you). If you pass by reference, the function can update the original variable values and not have to return anything.