+ 1
How can i use variables from a header file C++
i've a header where i difined a variable for example an int n ; and i want to use this variable in source code for exemple in my header file n take a value 3 i want to conserve this value when including header file . file.h Int n=3; file.cpp int main(){ Cout<<n; return 0;} How to make that print 3 do you understand me 😅😅
6 Antworten
+ 1
Thank you Martin Taylor
0
it works with simple data but arrays the problem still present