Originally Posted by
nadroj
basically, edit the function (and the prototype, of course) so that it takes two arguments: an array of type string, and an integer, to specify the length of the array.
hope it helps.
something like this?
Code:
#include <cstdlib>
#include <iostream>
using namespace std;
void displayCards(string, int);
int main(int argc, char *argv[])
{
string Spade[13] = {"A", "2", "3", "4", "5" ,"6", "7", "8", "9", "10", "J", "Q", "K"};
random_shuffle(Spade, Spade + 13);
cout << "Player 1: \n";
displayCards(Spade, 13);
}
void displayCards(string Spade, int i)
{
for (int i=0; i<=13; i++)
cout << "S: "; Spade[i]);
}