+ 1
How can I define and declare a variable in separated files? (C++)
How can I define a variable on (example): sample.h and declare it on sample.cpp?
3 ответов
+ 2
You can declare it in the header and change the value.
use a struct or class and intialize with the desired value.
https://www.sololearn.com/learn/2917/?ref=app
+ 2
Dror Dahari
You're welcome!😀
+ 1
Thanks!