1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59
|
#include "Step.h"
int Step::Rand()
{
int a;
srand(time(NULL));
a = rand() % 2;
return a;
}
int Step::Rand1()
{
int a;
srand(time(NULL));
a = rand() % 1000 + 2;
return a;
}
int Step::Rand7()
{
int a;
srand(time(NULL));
a = rand() % 10+4;
return a;
}
string Step::Randchar()
{
srand(time(NULL));
char alphabet[26] = {'a','b','c', 'd', 'e', 'f', 'g',
'h', 'i', 'j', 'k', 'l', 'm', 'n',
'o', 'p', 'q', 'r', 's', 't', 'u',
'v', 'w', 'x', 'y', 'z' };
int a = Rand7();
string s = "";
for (int i = 0; i < a; i++)
s = s + alphabet[rand() % 26];
return s;
}
Step::Step(const char * naziv,const char * tip)
{
this->naziv = naziv;
this->tip = tip;
}
void Step::Prikaz()
{
cout << naziv << ',' << tip << ',' << GetSpecAttribute();
}
Step::~Step()
{
delete[] naziv;
delete[] tip;
}
|