so i'm still newbie and i want to made an output card like that with value from As to King and i want to give the output into random card..so when i compile and run,the output can be ♠K or ♣8 or whatever random..it makes me crazy
what can i do to made that card and make it random?
and if there is possible i want to add sorting code to sort the card after random so i will made it 5 card at random, sorting depends to the number and the type..
the sorting of types is like this :
1.Diamond
2.Club
3.Love
4.Spade
class CCard
{
public:
booloperator<(const CCard &card) const // You need that in order to use std::sort
{
return ((m_Type < card.m_Type) && (m_Number < card.m_Number));
}
public:
int m_Number;
int m_Type;
int m_Pres;
};