class A {};
class B { public:
const A *a; //здесь не - const A * const a
};
class C { public:
B b;
void f( const A *aa ) { this.b.a = aa; } //'a' - constant cannot be modified
};
you cannot assign a pointer to a pointer if the pointer is declared as (const A *) and is a member of a class
but if it is just a class member, then fine
class A {};
class C { public:
const A *a;
void f( const A *aa ) { this.a = aa; } //нормально
};
I will complete the previous post with a rather rare case of an explicit constructor call
#define PRN Print( __FUNCSIG__ )
class A { public:
A() { PRN; }
void g() { F1::F1(); PRN; } //ошибка компиляции в то время как С++ вызывает безымянные конструктор и деструктор как если бы было нижеvoid f() { F1 f1; PRN; } //нормально
};
class F1 { public:
F1() { PRN; }
~F1() { PRN; }
};
voidOnStart()
{
A a;
a.g();
a.f();
}
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
syntax error
but this way: OK, so the compiler understands that A::S() is implied and it doesn't have to be explicitly statedDear Experts, how to implement the function"Apply to: ..." in the custom MA indicator (attached) ? " ?
to be like in the standard Moving Average indicator -"Apply to: First Indikator's Data".
I asked this question on forums, no one knows or says that this possibility isn't available in MQL.
And a question to developers - why the codes of built-in standard indicators are closed and they can't be modified?
you cannot assign a pointer to a pointer if the pointer is declared as (const A *) and is a member of a class
but if it is just a class member, then fine
I will complete the previous post with a rather rare case of an explicit constructor call
After #define sometimes comments are possible
After #define sometimes comments are possible
Icons have significantly lost their clarity
Was build 1060
Became build 1100
Do I need to increase the size at the expense of clarity?
Icons have significantly lost their clarity
Was build 1060
Became build 1100