use static variable inside class across instances
Hi,
I want to declare static field inside a class and access it across many instances. ( like java ) . but i see there are some practical limitaions! that I couldn't figure out!!! I know how it can be used in function but i want to use it as static field.
can you tell me how to do so. thanks in advance....
Read the documentation: Static Members of a Class
Static variables are referenced like this:
ClassName::StaticVarName
- www.mql5.com
Read the documentation: Static Members of a Class
Static variables are referenced like this:
thank you @ Drazen PenicXD
Hi,
I want to declare static field inside a class and access it across many instances. ( like java ) . but i see there are some practical limitaions! that I couldn't figure out!!! I know how it can be used in function but i want to use it as static field.
can you tell me how to do so. thanks in advance....