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.
- Big changes for MT4, in a few weeks
- Constants required in array
- Is there a way to alter 'extern vars'.. ?!
Use #define instruction. Constant declaration
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.

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