Cheers to my first ever post on the first ever programming forum I've ever been in!
Anyways, for the context, I'm writing a quiz game in c++ along with my friend. It's text based and pretty simple.
Do note that I just recently started learning about c++ so my technical knowledge is nil and I might not understand more advanced stuff but I get the gist.
So I have say, 50 questions in the script right now. That means that there will be 50 question holding variables, 50 x 5 more variables for the options and 50 variables holding the answer.
Variables are important because I want the order of questions to be completely random. I will post the code after it's done.
So is it possible to declare the variables below all of the script? I know that you can put functions below the main function so I was thinking maybe there was a way to declare global variables via functions?
That would be helpful because otherwise you would have to scroll over some 350 lines of variables just to get to the main function!
So assuming that's not possible, can somebody explain to me how I can use modules in c++ for this purpose? I have never done anything related to importing in c++ so if it comes to this, explain it like you would to a 5 year old.
Thanks for reading.