EasyPen Free
http://www.mql5.com/en/market/product/243
MT5ですけど、お絵かきソフトですね。
こんなことできるなんて、うーん、便利。MT4で似たようなものを作ってみたいです。
In MQL5, there is a possibility to dynamically create objects of complex type. This is done by the new operator, which returns a descriptor of the created object. Descriptor is 8 bytes large. Syntactically, object descriptors in MQL5 are similar to pointers in C++.
(略)
Again, unlike C++, the variable hobject from the example above is not a pointer to the memory, it is a descriptor of the object.
//クラス作成
class C1{};
class C2{};
class C3{};
class C4{};
//とりあえずオブジェクト3つ作ります
C1* pObj1 = new C1();
C2* pObj2 = new C2();
C3* pObj3 = new C3();
delete pObj2; //真ん中のC2だけ解放
C4* pObj4 = new C4(); //新たに作ります
//出力
Print("pObj1 = ", pObj1);
Print("pObj3 = ", pObj3);
Print("pObj4 = ", pObj4);
//残りを解放
delete pObj1;
delete pObj3;
delete pObj4;
•Unlike C++, the size of the internal representation of the enumerated type in MQL5 is always equal to 4 bytes. That is, sizeof (months) returns the value 4.
•Unlike C++, an anonymous enumeration can't be declared in MQL5. That is, a unique name must be always specified after the enum keyword.
enum { // enum 列挙型名{...}
USA = 1,
EURO,
GBR,
JPN,
AUS,
CHE,
CAN
};
printf("JPN = %d", JPN);
この広告は180日以上新しい記事の投稿がないブログに表示されております。