can i interact with\change change the values of variables within headers? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

can i interact with\change change the values of variables within headers?

so this is a problem with my game i'm probably going to ask more questions because i'm a beginner still, i have lots to learn. wait a minute this is called sololearn no wonder. that last sentence was a bit weird. anyways, i want to have a header (a type of c++ script. if you you did not know that you are probably not be able to help me) that handles most of the menu like (expect a lot of "button"): quit button, play button, save button, AND load button. the only thing the script doesn't do is..... RENDERING, that's handled by the main script that has the game loop. basicly there is a variable that contains the image and the main script takes that image and renders it. if it cant find that variable it will just, not render. any ways i can do that? bonus question: is possible with 2 CPPs?

15th Nov 2019, 5:33 PM
doonv
doonv - avatar
5 Answers
+ 1
I feel the question was very unclear. Can the goal of the question be more explicate in the future? - from previous edit. I removed the comments about, where to learn more sdl2 and how to improve on what I believed to be a coding question.
15th Nov 2019, 8:39 PM
Manual
Manual - avatar
0
this isnt really a coding question its more like a is this possible? question
15th Nov 2019, 5:54 PM
doonv
doonv - avatar
0
i don't have discord, and i am not going to install it.
15th Nov 2019, 5:57 PM
doonv
doonv - avatar
0
Ok. About the question. Yes you can and should interact with your variables. In the .cpp file to the header. Interacting with values on two source files depends on the application.
15th Nov 2019, 6:03 PM
Manual
Manual - avatar
0
well can someone just answer this question?
15th Nov 2019, 6:04 PM
doonv
doonv - avatar