Helleue :)
I am trying to create a quiz where the user can set their own questions, and answers, and what i want to do is having the users questions and answers inside of an array. I have tried using "vector", and "new" but haven't figured out how to use them with string, since the program crashes right after it waits for the user input, my guess is it has something to do with the arrays(que & ans).
So my request is if someone can hint a way to fix it, or a link so i can read up on it :)
The current code: (it got flaws, and as i said the vector thing doesnt work)
Line 13: The push_back adds the question to the que vector. Since you start i at 1, que[1] is undefined. Only que[0] exists after you push the first question on the vector. Ditto for answer.
Line 17: I think you want to be pushing answer, not question.
Lines 9-10: These vectors will go out of scope when you exit the for loop.