MQL4 - automated forex trading   /  

Forum

Constants in MQL4

Back to topics list To post a new topic, please log in or register

avatar
5
Philfx 2008.04.20 02:28 
Just a quick question Is there a way of defining a constant? What I mean is defining something like int a = 5; and defining it in such a way that it cannot be altered or if an attempt was made to alter it an error would be generated.
article

Integrating MetaTrader 4 Client Terminal with MS SQL Server

The article gives an example of integrating MetaTrader 4 Client Terminal with MS SQL Server using a dll. Attached are both source codes in ะก++ and in MQL4, and a ready-made and compiled Visual C++ 6.0 SP5 project.


avatar
Moderator
33779
Rosh 2008.04.20 19:20 
Use #define instruction. Constant declaration

avatar
5
Philfx 2008.04.20 22:44 
Hi Rosh - thanks that works. I didn't think that method would generate an error if an attempt was made to alter its value but I just tried it out and if you try to alter its value the code won't compile so that is fine. Thanks.
Back to topics list  

To add comments, please log in or register