Problem in my programme

Well, so I'm writing a program that will 'interrogate' words (pardon my imperfect English) for school.
So most of the program is working, but somehow when you've completed the interrogation it asks if you want another one, it probably sounds strange but I'll show you the source code, this is the part where the overHoor(interrogate) function gets called

1
2
3
4
5
6
7
8
9
10
11
12
cout << "Do you want an interrogation? (type \"Yes\" or \"No\")\n";
string answer;
getline(cin, answer);
if(answer == "Yes" || answer == "yes")
{
	overHoor(wordsFor, wordsNat);

}

// some else if, and else's

return true;


inside the overHoor function it aks what kind of interrogation you want and then calls the specific interrogation function, inside the one I have problems with:

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

cout << "Now starting the interrogation (native->foreign)!\n\n\n\n\n";
while(!passed)
{
	oldK = k;
	k = (rand() % ((sizeof(natWords)) / (sizeof(char))));
	if(k == oldK || goods[k] == true)
	{
		continue;
	}

	cout << "\n\nTranslate: " << natWords[k] << endl;
	getline(cin, answer);
	if(answer == forWords[k])
	{
		cout << "Correct!" << endl;
		goods[k] = true;
		amGood++;
	}
	else
	{
		cout << "False! You were supposed to say: " <<  forWords[k] << ", better luck next time!\n\n\n" << endl;
		amWrong++;
	}

	if(amGood == ((sizeof(natWords)) / (sizeof(char))))
	{
		passed = true;
	}
	
}
cout << "Loop Done!";
for(int i = 0; i < (sizeof(goods) / sizeof(bool)); i++)
{
	goods[i] = false;
}
} // End of function 

After the specific interrogation function it jumps back to the first piece of code, however if you then complete the interrogation again, it doesn't jump back a third time.
Also the part where it asks you if you want an interrogation is about half way through a function, and it doesn't run the statements before it.
(ofcourse this isn't the entire source code)
If anyone could help me it would really be appreciated!
There's really not enough here to see a problem.
Can you post complete functions?
Topic archived. No new replies allowed.