错误、漏洞、问题 - 页 3110

 
编译抽象错误:代码优化失败
#define  SIZE    100000000
void OnStart()
{
static union X {
    int i;
} x[SIZE];
    bool b = true;
    for ( int i = 0; i < ArraySize(x) && (b = (x[i].i ==  0)); i++ );
    Print( b );
}

 

通过F5它挂断了。

#define  SIZE    100000
void OnStart()
{
static union X {
    int i;
} x[SIZE] = {};
    bool b = true;
    for ( int i = 0; i < ArraySize(x) && (b = (x[i].i ==  0)); i++ );
    Print( b );
}
 
Aleksey Mavrin #:

怎么会...他们是否从公共服务部门或其他地方挖来了开发商?

你有没有试过经纪人的技术支持(和他们的论坛)?它在他们的服务器上就是这样一个奇迹。这与元配比有什么关系?

 

建3121

ArraySize()在某些情况下会返回一个不正确的大小。

一个错误重现的例子。

struct MyStruct
{
   double first;
   double second;
};

void OnStart()
{
   MyStruct dynamicArray[];
   ArrayResize( dynamicArray, 5 );

   for( int i = 0; i < 5; i++ )
   {
      dynamicArray[i].first = rand();
      dynamicArray[i].second = rand();
   }

   MyStruct staticArray[5];

   for( int i = 0; i < 5; i++ )
   {
      staticArray[i].first = rand();
      staticArray[i].second = rand();
   }

   Print( "Size of dynamicArray = ", ArraySize( dynamicArray ) );
   Print( "Size of staticArray = ", ArraySize( staticArray ) );

   Print( "-----------------------------Dynamic array in function---------------------------------" );
   anyFuncion( dynamicArray );
   Print( "-----------------------------Static array in function----------------------------------" );
   anyFuncion( staticArray );
}

void anyFuncion( MyStruct& array[] )
{
   int sz = ArraySize( array );
   Print( "Size of array in function = ", sz );

   for( int i = 0; i < sz; i++ )
   {
      PrintFormat( "array[%i].first = %f", i, array[i].first );
      PrintFormat( "array[%i].second = %f", i, array[i].second );
   }
}
 
Koldun Zloy #:

建3121

ArraySize()在某些情况下会返回一个不正确的大小。

一个错误重现的例子。

谢谢你。修正于3123

 

你好。

我无法从市场上下载任何产品。这可能是什么原因呢?

谢谢你。

 
Ded-Leha-Tankist #:

你好。

我无法从市场上下载任何产品。这可能是什么原因呢?

谢谢你。

你的操作系统是什么,有多少位?

 
Vladimir Pastushak #:

你的操作系统是什么,有多少位?

2021.12.07 16:03:12.150 Terminal        MetaTrader 5 build 2361 started for MetaQuotes Software Corp.
2021.12.07 16:03:12.150 Terminal        Windows 7 Service Pack 1 build 7601, AMD Athlon II X2 240 Processor, 0 / 1 Gb memory, 43 / 82 Gb disk, IE 11, Admin, GMT+3
 
Ded-Leha-Tankist #:

你有一个32位的操作系统吗?如果是这样,你需要在64位操作系统上工作,因为对过时的32位系统的支持已经停止了。

 
Ded-Leha-Tankist #:

此前曾宣布,对32位系统的支持已经停止。

你需要一台装有64位Windows系统和至少4GB的电脑。RAM。