Bool access

 
I have a base class that declares a number of variables chief among which are 4 bools

These bools are public

I then have two classes that inherit from this base class.

One of these classes is responsible for setting the value of these booleans which it does with no trouble.

My problem is when the other class tries to access the values of these variables once updated, they are always false.

How should I define them in the base class?
 
At first you better attach your source code here.

Which build number do you use?
Documentation on MQL5: Standard Constants, Enumerations and Structures / Environment State / Client Terminal Properties
  • www.mql5.com
Standard Constants, Enumerations and Structures / Environment State / Client Terminal Properties - Documentation on MQL5
 
Hi

My source code is over 1k lines long... ;(

am using build 344
 
ssn:
Hi

My source code is over 1k lines long... ;(

am using build 344

Are you sure that you trying to access same variables? Every child has its own inner variables:

child_1.My_public_var & child_2.My_public_var are absolutely different variables! 

 


hi


i want to know, are you make a forex auto system by order?

best regards,Teymur M.

 
ssn:
Hi

My source code is over 1k lines long... ;(

am using build 344
Try to shorten the code and attach it here.
 
I think I have resolved this.

The method in the subclass responsible for setting these variables was private!

Thanks for all the help any way.