I like to create a file
handling class. It would be nice if some member functions could have
the same names like the normal file handling functions, i.e.
FileWrite, FileRead. But a class would always call the member
functions with that name and it would not be possible to call the
normal functions.
Is there something like a
namespace „system“ or something similar, to call the normal file
functions?
An example:
Class x
{
private:
void SyncToCloud();
public:
x();
~x();
void FileWrite();
void FileRead();
};
None of the member
functions would be able to call FileWrite(), because the class would
search for a member function with that name. If member function
x::FileWrite() would call FileWrite() a recursive call would occur
and maybe an endless loop.
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.
I like to create a file handling class. It would be nice if some member functions could have the same names like the normal file handling functions, i.e. FileWrite, FileRead. But a class would always call the member functions with that name and it would not be possible to call the normal functions.
Is there something like a namespace „system“ or something similar, to call the normal file functions?
An example:
Class x
{
private:
void SyncToCloud();
public:
x();
~x();
void FileWrite();
void FileRead();
};
None of the member functions would be able to call FileWrite(), because the class would search for a member function with that name. If member function x::FileWrite() would call FileWrite() a recursive call would occur and maybe an endless loop.