Errors, bugs, questions - page 1253

 
IvanIvanov:
I mean fast, the site is slow or something :-))))))) It helped if I rebooted my router or my IP changed :-))))
It's not slowing down. It's protecting itself.
 
server:
It's not slowing down, it's defending itself.
A humble question - from whom?
 
IvanIvanov:

I was looking through my profile, decided to delete friend requests. after about the 10th deletion, the following thing popped up ....

And now I can not go to the site from my home computer, cookies deleted..... all the same trying to go to the site pops up this stuff .... I am using my login and password from my VPN, help me, I think I may be blocked by ipi

Change IP (reconnection). Protection against frequent requests.
 
How can I get test statistics for each traded symbol when optimising a multi-currency Expert Advisor?
 
ALXIMIKS:
The problem is that you have to keep looking for these problems. Or rather how to circumvent these problems you've created.

For example, any numeric global variable that affects the result and depends on extern variable.
When you set a new property, the result will be of the old one.
Of course, you can avoid this problem by initializing a global variable in Init.
Why do we need usability? There declared. somewhere in the gob initialized..... all is well.

You said there was a problem. You don't want to show the code.

What is "any numeric global variable that affects the result and depends on the extern variable"? Each word individually is clear. The meaning of the whole phrase is not.

 
ALXIMIKS:

Hello, you have memory leaks!!!!!!!!!!

This is how it happens because of the static. It's fine without it.
Why is a new structure created every time? It'sstatic.

I don't know your quirks withstatic
because you change its properties( lifetime and creationtime ) whenever you want and it depends on used program.


I just need one structure inside function with lifetime of the whole program
How to get it, please advise.
(I'll have to bypass it with global variable, but why do I need global variable if I want to use it inside only one function? Very convenient)

Thanks for the message.

Fixed it.

Wait for next build.

 

Why can't you do that?

class A
{
public:
  template <typename T>
  void Test( T &obj )
  {
    T b; // Compilation Error: '*' - name expected
  }
};

void OnStart()
{
  A* a = new A;  
  a.Test(a);  
  delete(a);
}
 
zaskok:

Why can't you do that?

Does this design work in CPP?
 
alexvd:
Does this design work in CPP?

I don't see why not. But I checked in VS2012 just in case:

#include "stdafx.h"

class A
{
public:
  template <typename T>
  void Test( T &obj )
  {
    T b; // MQL5-Compilation Error: '*' - name expected
  }
};

int _tmain(int argc, _TCHAR* argv[])
{
  A* a = new A;  
  a->Test(a);  
  delete(a);
  
  return 0;
}

Result:

========== Построение: успешно: 1, с ошибками: 0, без изменений: 0, пропущено: 0 ==========
 

How to write object without dynamic objects, strings and virtual methods to file?

Structures-objects are written via FileWriteStruct without any questions, classes-objects are not.

Writing/reading every member of class data is not solid for TIOBE language.

Reason: