Alexey Navoykov: It's a misprint with the int type, I suppose?
Yes... Corrected everywhere to void - for simplicity.
On the other hand, the meaning, but already warnings (*) are not clear
//lib.h //объявления
int g(); //Warning: no #import declaration //(*)void f(); //Warning: no #import declaration
lib.h is a general declaration file, while lib.mq5, lib2.mq5, lib3.mq5... files with implementations, which are included by means of #include as needed. Thus, there may be no int g() implementation in a particular build at all, but the obscure warning is there. In fact, there are hundreds of them and they prevent you from seeing really important warnings
Yes... Corrected everywhere to void - for simplicity.
On the other hand, the meaning, but already warnings (*) are not clear
lib.h is a common file with declarations, while lib.mq5, lib2.mq5, lib3.mq5... files with implementations, that are plugged in via #include as needed. Thus, there may be no int g() implementation in a particular build at all, but the obscure warning is there. Actually there are hundreds of them, and they hamper the view of really important warnings.
Note that even if you specify an implementation in the same inclusion book, this warning will also pop up.
struct A
{
int i;
};
struct B : public A
{
string Str;
};
voidOnStart()
{
A a = {0};
B b;
b = a;
a = b; // OK
}
I'm wondering whether to use this feature in my code or not. If it works in C++, I'll use it. No, I don't think so, because it may be cancelled in next builds.
Is it an error that there is no initialisation warning?
struct A
{
int i;
};
struct B : public A
{
string Str;
};
voidOnStart()
{
A a;
B b;
// b = a; // possible use of uninitialized variable 'a'
a = b; // OK
}
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.
And there is no mistake
Error during compilation
Otherwise:
It's fine. What's the difference?
Besides, C++ compiles normally in one pass:
Unclear warning on compilation
Otherwise:
everything's fine - there's no warning. What difference does it make?
Unclear warning during compilation
It's a misprint with the int type, I suppose?
Yes... Corrected everywhere to void - for simplicity.
On the other hand, the meaning, but already warnings (*) are not clear
lib.h is a general declaration file, while lib.mq5, lib2.mq5, lib3.mq5... files with implementations, which are included by means of #include as needed. Thus, there may be no int g() implementation in a particular build at all, but the obscure warning is there. In fact, there are hundreds of them and they prevent you from seeing really important warningsYes... Corrected everywhere to void - for simplicity.
On the other hand, the meaning, but already warnings (*) are not clear
lib.h is a common file with declarations, while lib.mq5, lib2.mq5, lib3.mq5... files with implementations, that are plugged in via #include as needed. Thus, there may be no int g() implementation in a particular build at all, but the obscure warning is there. Actually there are hundreds of them, and they hamper the view of really important warnings.Note that even if you specify an implementation in the same inclusion book, this warning will also pop up.
The following error deserves special attention:
Essentially similar to this one, but with many files, rather unobvious and difficult to understand