Esempio n. 1
0
int main( int argc, char *argv[] )
{
    //char *suit[4] = {"4epBu", "6y6HbI", "TpeFbI", "nuku"};
    
    std::string suit[4] = {"4epBu", "6y6HbI", "TpeFbI", "nuku"};

    std::string face[13] = {"Ty3", "gBojka", "Tpojka", "4eTBepka", 
                      "nqTepka", "wecTepka", "ceMepka", "BocMepka",
                      "geBqTka", "gecqTka", "BaLeT", "gaMa", "KopoLb"};
    
    // int deck[4][13] = {0};
    
    srand (time(NULL));
    
    // shuffle (deck);
    deck _deck = deck();
    _deck.shuffle();

    my_time _mt;
    _mt.ms = 134;
    _mt._name = "test";
    printf ("name: %s\n", _mt._name);
    print_my_struct(&_mt);
    std::cout << Timestamp() << "\n";
    _deck.print_deck();
    system("PAUSE");
    return 0;   
}
Esempio n. 2
0
int main( int argc, char* argv[] ) {

    my_struct ms;
    ms.i = 123;
    ms.point = cvPoint(4,5);
    ms.rect = cvRect(6, 7, 8, 9);

    CvFileStorage* fs_write = cvOpenFileStorage( "my_struct1.xml", NULL, CV_STORAGE_WRITE );
    write_my_struct( fs_write, "Hello my_struct!", &ms);
    cvReleaseFileStorage( &fs_write );

    my_struct ms_read;
    CvFileStorage *fs_read = cvOpenFileStorage ("my_struct2.xml", NULL, CV_STORAGE_READ);
    read_my_struct(fs_read, NULL, &ms_read);
    cvReleaseFileStorage(&fs_read);

    print_my_struct( &ms_read );

    return 0;

}