#include #include #include #include using namespace std; #include #include #include static char program_name[]="bd"; #define THE_VERSION "0.1" namespace info{ enum { WEST=0,NORTH=1,EAST=2,SOUTH=3,}; }; static char* deno[]={"Spade","Heart","Diamond","Cotton",}; static char card_symbol[]="23456789TJQKA"; // p - pointer to argument // idx - index in argument // default value static int get_number_arg(char* p,int def) { if (isdigit(*p)) { def = atoi(p); } return def; } static void print_help() { cout<<"Usage: "< cout<<"Bridge Dealer"< cout<<"Example: "< cout< cout<<" -p number of players, value ranges from 1 to 4"< cout<<" \""< cout<<" -v,--version print version information and exit"< cout<<" -h,--help display this help and exit"< cout< exit(0); } |