EDIT: Please read my last reply, if this is confusing
I want to loop each loop by itself, as you can see the first one and the second one will make random Strings based on how LONG the String should be, However, when I generate them, the first loop comes correct( if the user input 2 I get two random chars) the second one comes wrong( if the user input 3 I get 3 chars the same repeated not random which is wrong ), the random chars are the same:
How Long The 1st String Should Be? (normal is: 2) 2
How Long the 2nd String Should Be? 3
Add A prefix O
here is your resualts
/em/aaa/o
/xo/aaa/o
/hh/aaa/o
/be/aaa/o
/nj/aaa/o
/fj/aaa/o
/xj/aaa/o
/zd/aaa/o
/iq/aaa/o
/qc/aaa/o
/pu/aaa/o
/bl/aaa/o
/em/aaa/o
/vs/aaa/o
/tc/aaa/o
/yc/aaa/o
/on/aaa/o
/dp/aaa/o
/jw/aaa/o
/ct/aaa/o
How Long The 1st String Should Be? (normal is: 2) 2
How Long the 2nd String Should Be? 3
Add A prefix O
here is your resualts
/em/wer/o
/xo/sdf/o
/hh/rwf/o
/be/sfs/o
/nj/sfc/o
/fj/sxf/o
/xj/hbd/o
/zd/enw/o
/iq/ndr/o
/qc/bfs/o
/pu/bdr/o
/bl/rgd/o
/em/gsv/o
/vs/ssr/o
/tc/gsr/o
/yc/hrb/o
/on/ert/o
/dp/bre/o
/jw/hfx/o
/ct/xer/o
so 1stRandomStrings/2ndRandomStrings/Prefix
example : /ct/sda/o
/ca/dac/o
what I get is /ca/dac/o
/xd/dac/o
as you can see "dac" string is the same!! it should be random etc.. I used seeding/timer but it didn't work
also the program takes the user input and adds "/" char ( you can ignore this I know how to add it )
char genRandom()
{
return'a' + rand() % 26; // <--- this to be assigned for the 1st loop to //make random letters from A TO Z variables.
}
char genRandom2()
{
srand (time(NULL));
return'a' + rand() % 26; // <--- // <--- this to be assigned for the 2nd //loop to make random letters from A TO Z
for (int strLen2 = 0;strLen2 < ; ++strLen2)
{
Str2 += genRandom(); // AS YOU CAN SEE HERE WE RANDOMIZE THE 1ST // LOOP
}
for (int numStrings = 0; numStrings < numOfStrings; numStrings++)
{
for (int strLen = 0; strLen < lengthOfString; ++strLen)
{
Str += genRandom2(); // HERE IS THE SECOND ONE
}
std::cout << Str <<"/"<<Str2 <<"/"<<PREFIX ;
cout << "\nHow Many loops Would You Like Today?: ";
cin >> numOfStrings; //
cout << "How Long The 1st String Should Be? (normal is: 2) ";
cin >> lengthOfString;
cout << "How Long the 2nd String Should Be ?";
cin >> lengthOfStringZ;
cout << "Add The Target File e.a up.php ";
cin >> PREFIX;
for (int numStrings = 0; numStrings < numOfStrings; numStrings++)
{
for (int strLen = 0; strLen < lengthOfString; ++strLen)
{
Str += genRandom();
}
for (int strLen2 = 0; strLen2 < lengthOfStringZ; ++strLen2)
{
Str2 += genRandom2();
}
std::cout << Str <<"/"<<Str2 <<"/"<<PREFIX ;
How Many Loops: 20
How Long The 1st String Should Be? (normal is: 2) 2
How Long the 2nd String Should Be? 3
Add Prefix k
/sn/vvv/k
/eo/vvvvvv/k
/eo/vvvvvvvvv/k
/eo/vvvvvvvvvvvv/k
/eo/vvvvvvvvvvvvvvv/k
/eo/vvvvvvvvvvvvvvvvvv/k
/eo/vvvvvvvvvvvvvvvvvvvvv/k
/eo/vvvvvvvvvvvvvvvvvvvvvvvv/k
/eo/vvvvvvvvvvvvvvvvvvvvvvvvvvv/k
/eo/vvvvvvvvvvvvvvvvvvvvvvvvvvvvvv/k
/eo/vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv/k
/eo/vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv/k
/eo/vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv/k
/eo/vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv/k
/eo/vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv/k
/eo/vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv/k
/eo/vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv/k
/eo/vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv/k
/eo/vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv/k
/eo/vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv/k