Advertisement
hugol

Untitled

Nov 26th, 2013
139
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.71 KB | None | 0 0
  1. //
  2.     tabcount = 2;
  3.  
  4.     Tabs = (tab*)malloc(sizeof(tab) * 4);
  5.  
  6.     // liczby
  7.     Tabs[0].name = "liczby";
  8.     Tabs[0].column_count = 1;
  9.     Tabs[0].column_names = (char**)malloc(sizeof(char*) * 1);
  10.     Tabs[0].column_names[0] = "wartosc";
  11.     Tabs[0].column_data = (void**)malloc(sizeof(void*) * 1);
  12.     Tabs[0].column_types = (unsigned long long int*)malloc(sizeof(unsigned long long int) * 1);
  13.     Tabs[0].column_types[0] = TYP::INT;
  14.     //
  15.    
  16.     // end:liczby
  17.  
  18.     // studenci
  19.     Tabs[1].name = "studenci";
  20.     Tabs[1].column_count = 3;
  21.     Tabs[1].column_names = (char**)malloc(sizeof(char*) * 3);
  22.     Tabs[1].column_names[0] = "indeks";
  23.     Tabs[1].column_names[1] = "imie" ;
  24.     Tabs[1].column_names[2] = "nazwisko";
  25.  
  26.     Tabs[1].column_data = (void**)malloc(sizeof(void*) * 3);
  27.     Tabs[1].column_types = (unsigned long long int*)malloc(sizeof(unsigned long long int) * 3);
  28.     Tabs[1].column_types[0] = TYP::INT;
  29.     Tabs[1].column_types[1] = TYP::STRING;
  30.     Tabs[1].column_types[2] = TYP::STRING;
  31.     // end:studenci
  32.  
  33.     // przedmioty
  34.     Tabs[2].name = "przedmioty";
  35.     Tabs[2].column_count = 3;
  36.     Tabs[2].column_names = (char**)malloc(sizeof(char*) * 3);
  37.     Tabs[2].column_names[0] = "id";
  38.     Tabs[2].column_names[1] = "nazwa" ;
  39.     Tabs[2].column_names[2] = "semestr";
  40.  
  41.     Tabs[2].column_data = (void**)malloc(sizeof(void*) * 3);
  42.     Tabs[2].column_types = (unsigned long long int*)malloc(sizeof(unsigned long long int) * 3);
  43.     Tabs[2].column_types[0] = TYP::INCINT;
  44.     Tabs[2].column_types[1] = TYP::STRING;
  45.     Tabs[2].column_types[2] = TYP::CLAMP;
  46.     Tabs[2].column_types[2]+= 1 << TYP::MASK::CLAMPHIGHER; // must be higher than , range:0 - 32767 (15 bits)
  47.     Tabs[2].column_types[2]+= 10 << TYP::MASK::CLAMPLOWER; // must be lower than , range:0 - 32767 (15 bits)
  48.     // end:przedmioty
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement