Download MetaTrader 5

Could a class call a system function when it has a member function with equal name?

To add comments, please log in or register

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



  void   SyncToCloud();




  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.


The member function is x::FileWrite() which is how you call outside a member function it if it was a static function.

The global function is ::FileWrite()

To add comments, please log in or register