i am having these errors:
error LNK2019: unresolved external symbol _main referenced in function ___tmainCRTStartup
fatal error LNK1120: 1 unresolved externals
#include <iostream>
#include <string>
#include <time.h>
#include <stdlib.h>
using namespace std;
class Card{
public:
Card(string s[4], string r[13]);
Card(){ //constructor
s[0]="Spade";
s[1]="Heart";
s[2]="club";
s[3]="Diamond";
r[0]="Ace";
r[1]="Two";
r[2]="Three";
r[3]="Four";
r[4]="Five";
r[5]="Six";
r[6]="Seven";
r[7]="Eight";
r[8]="Nine";
r[9]="Ten";
r[10]="Joker";
r[11]="Queen";
r[12]="King";
}
string suit;
string rank;
int i;
srand ( time(NULL) );
getSuit(){
do{
i=rand()%10-6;
}while (i >=4 || i<0);
suit=s[i];
}
getRank(){
do{
i=rand()%10+3;
}while (i >=13 || i<0);
Rank=r[i];
}
getSuit();
getRank();
void print(){
cout>>getSuit()>>getRank>>endl;
}
void print(); //Example :"SpadeA",Diadmond 10" etc.
};
Please advise Thank You.

New Topic/Question
Reply




MultiQuote





|