//+------------------------------------------------------------------+//| ClassEx.mq5 |//| Copyright 2013, MetaQuotes Software Corp. |//| http://www.mql5.com |//+------------------------------------------------------------------+#property copyright "Copyright 2013, MetaQuotes Software Corp."#property link "http://www.mql5.com"#property version "1.00"//+------------------------------------------------------------------+//| Script program start function |//+------------------------------------------------------------------+class CClass1
{
public:
CClass1(void){};
CClass1(int i){};
};
class CClass2 : public CClass1
{
//public:// CClass2();
};
voidOnStart()
{
//---
CClass1 lCC1(0);
// CClass2 lCC2(0);
}
//+------------------------------------------------------------------+
Good afternoon!
If I remove the //CClass2 comment, I get a "wrong parameters count" error.
It's been asked here before, but the topic has gone deeper into another direction. My question is as follows. I expect CClass2 lCC2(0), should call the base class constructor. This doesn't seem to be happening. What is the problem?
Yesterday I connected my signal, but today I deleted it. Wanted to subscribe to someone else's signal, but now the system won't let me in. Says, "Already have a signal broadcasting from the specified account. No resale of signals allowed."
My signal is deleted, but now I can't subscribe to someone else's. What to do? Help me!
If I remove the //CClass2 comment, I get a "wrong parameters count" error.
It's been asked here before, but the topic has gone deeper into another direction. My question is as follows. I expect CClass2 lCC2(0), should call the base class constructor. This doesn't seem to be happening. What is the problem?
Thanks!!!
YourCClass2doesn'thave a constructor,so you can'tpass the parameter;-)
Is there any way in MQL5 to pass a two-dimensional array of unknown dimensions to a function? And how can I search a two-dimensional array?
Thank you.
I too have faced the problem of passing a multidimensional array into a function. MQL5 does not seem to be designed for it. Either you use only one-dimensional array or explicitly specify the dimension of the array to be passed in the function, and the flexibility and universality of the function are lost. That's too bad.
MT4 is much more flexible in this respect. And there are no problems in C++ either; you just pass the array's dimensions as additional parameters of a function. However, MT5 has turned out to be some kind of a stump. It is neither here nor there.
I too have faced the problem of passing a multidimensional array into a function. It seems that MQL5 is not at all suitable for it. Either you use only one-dimensional array or explicitly specify the dimension of the passed array in the function, and the flexibility and universality of the function are lost. That's too bad.
MT4 is much more flexible in this respect. And there are no problems in C++ either; you just pass the array's dimensions as additional parameters of a function. However, MT5 has turned out to be some kind of a wrap. It is neither here nor there.
You can use standard classes, library (CArray) and create an array of arrays.
Good afternoon!
If I remove the //CClass2 comment, I get a "wrong parameters count" error.
It's been asked here before, but the topic has gone deeper into another direction. My question is as follows. I expect CClass2 lCC2(0), should call the base class constructor. This doesn't seem to be happening. What is the problem?
Thanks!!!
Good afternoon.
Yesterday I connected my signal, but today I deleted it. Wanted to subscribe to someone else's signal, but now the system won't let me in. Says, "Already have a signal broadcasting from the specified account. No resale of signals allowed."
My signal is deleted, but now I can't subscribe to someone else's. What to do? Help me!
My signal has been deleted, but now I can't subscribe to someone else's. What to do? Help me!
Good afternoon!
If I remove the //CClass2 comment, I get a "wrong parameters count" error.
It's been asked here before, but the topic has gone deeper into another direction. My question is as follows. I expect CClass2 lCC2(0), should call the base class constructor. This doesn't seem to be happening. What is the problem?
Thanks!!!
Your CClass2 doesn't have a constructor, so you can't pass the parameter;-)
Good afternoon.
Is there any way in MQL5 to pass a two-dimensional array of unknown dimensions to a function? And how can I search a two-dimensional array?
Thank you.
Good afternoon.
Is there any way in MQL5 to pass a two-dimensional array of unknown dimensions to a function? And how can I search a two-dimensional array?
Thank you.
I too have faced the problem of passing a multidimensional array into a function. MQL5 does not seem to be designed for it. Either you use only one-dimensional array or explicitly specify the dimension of the array to be passed in the function, and the flexibility and universality of the function are lost. That's too bad.
MT4 is much more flexible in this respect. And there are no problems in C++ either; you just pass the array's dimensions as additional parameters of a function. However, MT5 has turned out to be some kind of a stump. It is neither here nor there.
I too have faced the problem of passing a multidimensional array into a function. It seems that MQL5 is not at all suitable for it. Either you use only one-dimensional array or explicitly specify the dimension of the passed array in the function, and the flexibility and universality of the function are lost. That's too bad.
MT4 is much more flexible in this respect. And there are no problems in C++ either; you just pass the array's dimensions as additional parameters of a function. However, MT5 has turned out to be some kind of a wrap. It is neither here nor there.
You can use standard classes, library (CArray) and create an array of arrays.
See this article for details.
Has anyone asked about XAUUSD yet?
Actually, how to do it on the real? ;-)
This is what my Expert Advisor managed to trade: