Never mind.
I already fixed it.
This example solved my problem.
struct MyData { double Var1; // 1e waarde double Var2; // 2e waarde int counter; // Teller }; static MyData Test = {0};

You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Hi
I try to make a struct with contains static variables but I get this error in the compiler:
"struct has no members, size assigned to 1 byte"
"unresolved static variable "myData::Var1"
"unresolved static variable "myData::Var2"
"unresolved static variable "myData::counter"
Is it possible to store static variables in structures and if not, is there a solution for this problem.
Or is the declaration of struct itself already a "static" combination of variables?