I'm trying to make a small poker program. I have one little problem here. How can my enum hold string instead of char?
#include <iostream>
#include <cstdlib>
#include <ctime>
#include <string>
using namespace std;
enum mark{Hearts="Hearts",Diamonds='D', Spades='S', Clubs='C'};
char cards[5];
string marks[5];
int main()
{
srand(time(NULL));
cout<<"Welcome to the Classic Poker!\n";
cards[0]='4';
marks[0]=Hearts;
cout<<"cards[0]="<<cards[0]<<endl;
cout<<"marks[0]="<<marks[0]<<endl;
}
At this point it gives me a compiler error: "main.cpp|7|error: enumerator value for 'Hearts' is not an integer constant|".