First of all, thank you all for your hard work guys!
I have a problem here with a console program I'm developing for my fellow students at university (to help us in our anatomy exam)! It should run just on windows systems, though. Anyway, to put it down simply: We're going to attend an exam in quiz-form, so I thought to put all the question we have on our textbook in digital format and build a simple but useful quiz program to learn better and have better results in the exam. Now, speaking of the program: I have created a database of questions from the textbook (around 7 thousand lines of questions, answers and so on), all in the same source file of the program itself (I'm somewhat a lazy person, you know); I have included a few extras, such as a function that randomizes the order in which the questions are presented to the user, as well as the order of the possible answers. The problem is as follows: while I do not find any particulary relevant pattern in the pseudo-random extraction of the question's number, for each run of the program, the pattern of the supposedly randomized order of the possibile answers doesn't simply repeat itself once in a while...it's just FIXED! I have to close the program and click on the .exe file again to make it change!
I've used srand(time(NULL)), but it doesn't seem to work (not in THIS program, at least). Any help?
Here's a condensed version of the code: to test what I'm saying, just press the following sequence of keys:
1, ENTER, 1, ENTER, 5 (or whatever number you want...the smaller the better, trust me ^^), ENTER
At this point you'll be prompted the first question. As a sidenote, the rsq[x] array is the randomsequence the program creates when you chose the path of your first "1" entered as an input. I just displayed it for programming purposes but it will be removed from output as soon as the program is finished ^^.
So the question is: why rsq[x] is seems to be fronzen instead of changing every time?
Now the code (which is ready to be compiled. I use Dev-C++, by the way): HERE'S THE LINK (too long for the forum's limitations on characters number):
http://www.mediafire.com/file/w20nzwj1n4q/PQAL_testforum.cpp
THANKS IN ADVANCE FOR ALL YOUR HELP, and for al the help you already gave me in the past!