Stdlib.mqh question

Back to topics list To post a new topic, please log in or register
avatar
1
repxl 2016.04.29 13:37
 

hello, so i included the #include <stdlib.mqh>

 

i wanna use the std::map from this tutorial http://thispointer.com/stdmap-tutorial-part-1-usage-detail-with-examples/

 

but when i trying to write std::map<std::string, int> mapOfWords; i getting errors ...

 

please can somebody help me that uses c++ library stdlib ? it's really hard to find a solution all using the predefined arrays from mq4 but really i need map !! 

avatar
13008
WHRoeder 2016.04.29 14:35 #
 
repxl:

hello, so i included the #include <stdlib.mqh>

 i wanna use the std::map from this tutorial http://thispointer.com/stdmap-tutorial-part-1-usage-detail-with-examples/

  1. Have you bothered to look what is in stdlib.mqh?
    #import "stdlib.ex4"
    string ErrorDescription(int error_code);
    int    RGB(int red_value,int green_value,int blue_value);
    bool   CompareDoubles(double number1,double number2);
    string DoubleToStrMorePrecision(double number,int precision);
    string IntegerToHexString(int integer_number);
    
    That's it.

  2. Your link points to the C++ standard template library. The is MQL4 not C++ There is no STD:: anything.
    //| Mql4 is like C++ except: no typedefs or namespaces, no pointers  |
    //| to POD (so no iterators,) no operator(), operator*, or           |
    //| operator-> (latter two are unnecessary as pointers are           |
    //| automatically dereferenced when used.) No implicit conversions   |
    //| (operator bool), no Koenig lookup, can't return references, no   |
    //| dynamic cast (yet build 950,) no exceptions, no class friends, no|
    //| multiple inheritance. No stand alone operatorXX() functions (yet |
    //| build 950.) Can't use template<class X...> must be template      |
    //| <typename x...>. Given a f(const T&){} f(123) or f(f2()) doesn't |
    //| compile (Build 950,) must have a actual variable - this means    |
    //| templates can not deduce their data types for temporary          |
    //| variables. Structures must be passed by reference.               |
    

Back to topics list  

To add comments, please log in or register