I've just started a C++ class so I am a total beginner at this. I am having a problem figuring out how to pass by reference, and pass by value using the enum data type. The data types are as follows:
enum suits {hearts, spades, diamonds, clubs}
enum cardValues{two=2, three, four, five, six, seven, eight, nine, ten, jack, queen, king, ace}
I would post the whole code, but I'm trying to figure it out myself first...with no success so far.
So, with this data type, how does one declare the variable within the function? I will post what I have of one function (so far) and maybe someone can give me enough hints to fix it and make it work? The first line within the brackets is where I am trying to do the declaration but nothing I try works. Thanks to anyone that can help from the foolish beginner.
void getCardValue(cardValues & userCardValue);
{
userCardValue ;
cout << " What is the value of your card? => ";
cin >> userCardValue;
return;
}