![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
Novo
Fork of LukaIElmir by
Diff: Znak.h
- Revision:
- 5:654e3398c1ef
- Parent:
- 4:ba24ce878e87
diff -r ba24ce878e87 -r 654e3398c1ef Znak.h --- a/Znak.h Mon May 26 17:39:37 2014 +0000 +++ b/Znak.h Mon May 26 18:28:21 2014 +0000 @@ -3,24 +3,41 @@ #define ZNAK_H #include <vector> -class Znak +struct Znak { - public: - std::vector<int> registri; + + char niz[6]; + char vel; + Znak(int r0 = -1, int r1 = -1, int r2 = -1, int r3 = -1, int r4 = -1, int r5 = -1) { - if(r0 != -1) registri.push_back(r0); - if(r1 != -1) registri.push_back(r1); - if(r2 != -1) registri.push_back(r2); - if(r3 != -1) registri.push_back(r3); - if(r4 != -1) registri.push_back(r4); - if(r5 != -1) registri.push_back(r5); + if(r0 != -1) { + niz[0] = r0; + vel++; + if(r1 != -1){ + niz[1] = r1; + vel++; + } + if(r2 != -1){ + niz[2] = r2; + vel++; + if(r3 != -1){ + niz[3] = r3; + vel++; + if(r4 != -1){ + niz[4] = r4; + vel++; + if(r5 != -1){ + niz[5] = r5; + vel++; + } + } + } + } + + } + } - Znak(int *niz, int vel) - { - for(int i = 0; i < vel; i++) registri.push_back(niz[i]); - } - ~Znak() {} };