错误、漏洞、问题 - 页 1434 1...142714281429143014311432143314341435143614371438143914401441...3184 新评论 A100 2015.11.19 13:20 #14331 编译错误:'<' - 模板不匹配template<typename T> class A { T t; }; class B { B() : a( new A<int> ) {} //Error: <' - template mismatch A<int> * const a; }; Alexander 2015.11.19 13:35 #14332 A100:编译错误:'<' - 模板不匹配 谢谢你。 A100 2015.11.19 15:13 #14333 你不能在声明中为构造函数和析构函数指定全名,而你可以为方法指定全名(为什么前者更糟糕?)class A { void A::f() {} //нормально A::A() {} //Error: '::' - name expected virtual A::~A() {} //Error: '::' - name expected }; 为什么要这样做呢?- 它被证明是在模板中分离声明和实现的唯一方法。 Aleksandr Novikov 2015.11.20 08:26 #14334 对订单关闭窗口做一些事情。 订单号并不完全可见。当你改变一列的宽度时,它并不固定,而是向后缩小。而且窗口本身也不能被拉长。 Yury Kirillov 2015.11.20 11:11 #14335 无法用SetLevelValue()输出第五位数字//+------------------------------------------------------------------+ //| Ind_TickTest01.mq4 | //| Copyright 2015, MetaQuotes Software Corp. | //| https://www.mql5.com | //+------------------------------------------------------------------+ #property copyright "Copyright 2015, MetaQuotes Software Corp." #property link "https://www.mql5.com" #property version "1.00" #property strict #property indicator_separate_window #property indicator_buffers 2 //----- double Buffer0[]; double Buffer1[]; //+------------------------------------------------------------------+ //| Custom indicator initialization function | //+------------------------------------------------------------------+ int OnInit() { IndicatorSetInteger(INDICATOR_DIGITS,8); SetIndexBuffer(0,Buffer0); SetIndexBuffer(1,Buffer1); //----- return(INIT_SUCCEEDED); } //+------------------------------------------------------------------+ //| Custom indicator iteration function | //+------------------------------------------------------------------+ int OnCalculate(const int rates_total, const int prev_calculated, const datetime &time[], const double &open[], const double &high[], const double &low[], const double &close[], const long &tick_volume[], const long &volume[], const int &spread[]) { IndicatorShortName("Ind Bid NO 5-ZNAK!!! >>"+DoubleToString(Bid,_Digits)); Buffer0[0]=Bid-0.00015; Buffer1[0]=Bid+0.00015; SetLevelValue(0,Bid-0.0001); SetLevelValue(1,Bid-0.00005); SetLevelValue(2,Bid); SetLevelValue(3,Bid+0.00005); SetLevelValue(4,Bid+0.0001); return(rates_total); } //+------------------------------------------------------------------+ 结果。 TheXpert 2015.11.20 11:16 #14336 IndicatorDigits。我现在不知道它叫什么。我想有人会告诉我。 Artyom Trishkin 2015.11.20 11:23 #14337 Комбинатор: IndicatorDigits。现在我不知道它叫什么了。我想有人会告诉我。这一定是它;)IndicatorSetInteger(INDICATOR_DIGITS,Digits()); Yury Kirillov 2015.11.20 11:27 #14338 Artyom Trishkin:这一定是它;)试过了--没有帮助。//+------------------------------------------------------------------+ //| Ind_TickTest01.mq4 | //| Copyright 2015, MetaQuotes Software Corp. | //| https://www.mql5.com | //+------------------------------------------------------------------+ #property copyright "Copyright 2015, MetaQuotes Software Corp." #property link "https://www.mql5.com" #property version "1.00" #property strict #property indicator_separate_window #property indicator_buffers 2 //----- indicator_levelN double Buffer0[]; double Buffer1[]; //+------------------------------------------------------------------+ //| Custom indicator initialization function | //+------------------------------------------------------------------+ int OnInit() { IndicatorSetInteger(INDICATOR_DIGITS,5); SetIndexBuffer(0,Buffer0); SetIndexBuffer(1,Buffer1); //----- return(INIT_SUCCEEDED); } //+------------------------------------------------------------------+ //| Custom indicator iteration function | //+------------------------------------------------------------------+ int OnCalculate(const int rates_total, const int prev_calculated, const datetime &time[], const double &open[], const double &high[], const double &low[], const double &close[], const long &tick_volume[], const long &volume[], const int &spread[]) { IndicatorShortName("Ind Bid NO 5-ZNAK!!! >>"+DoubleToString(Bid,_Digits)); Buffer0[0]=Bid-0.00015; Buffer1[0]=Bid+0.00015; SetLevelValue(0,Bid-0.0001); SetLevelValue(1,Bid-0.000075); SetLevelValue(2,Bid-0.00005); SetLevelValue(3,Bid-0.000025); SetLevelValue(4,Bid); SetLevelValue(5,Bid+0.000025); SetLevelValue(6,Bid+0.00005); SetLevelValue(7,Bid+0.000075); SetLevelValue(8,Bid+0.0001); return(rates_total); } //+------------------------------------------------------------------+ Yury Kirillov 2015.11.20 13:56 #14339 Yury Kirillov:试过了--不起作用。响应SD。支持团队2015.11.20 14:33以四位数为单位,电平输出达到4位数的精度。以前没有人注意到这一点。这就是为什么这个地方直到现在还没有被触动。让我们 用 数字 指示器的精度来输出它 A100 2015.11.20 22:33 #14340 编译错误struct A { int a1; int a2; }; struct B { static A a; static int b1; static int b2; static int b3; }; A B::a = { 2, 3 }; int B::b1 = 1; int B::b2 = B::b1; //нормально int B::b3 = B::a.a2; //'a2' - non-static members and methods cannot be used 只要B::a是静态的就可以了 1...142714281429143014311432143314341435143614371438143914401441...3184 新评论 您错过了交易机会: 免费交易应用程序 8,000+信号可供复制 探索金融市场的经济新闻 注册 登录 拉丁字符(不带空格) 密码将被发送至该邮箱 发生错误 使用 Google 登录 您同意网站政策和使用条款 如果您没有帐号,请注册 可以使用cookies登录MQL5.com网站。 请在您的浏览器中启用必要的设置,否则您将无法登录。 忘记您的登录名/密码? 使用 Google 登录
编译错误:'<' - 模板不匹配
编译错误:'<' - 模板不匹配
你不能在声明中为构造函数和析构函数指定全名,而你可以为方法指定全名(为什么前者更糟糕?)
为什么要这样做呢?- 它被证明是在模板中分离声明和实现的唯一方法。对订单关闭窗口做一些事情。
订单号并不完全可见。当你改变一列的宽度时,它并不固定,而是向后缩小。而且窗口本身也不能被拉长。
无法用SetLevelValue()输出第五位数字
结果。
IndicatorDigits。现在我不知道它叫什么了。我想有人会告诉我。
这一定是它;)
这一定是它;)
试过了--没有帮助。
试过了--不起作用。
响应SD。
以四位数为单位,电平输出达到4位数的精度。
以前没有人注意到这一点。这就是为什么这个地方直到现在还没有被触动。
让我们 用 数字 指示器的精度来输出它
编译错误
只要B::a是静态的就可以了