From array of doubles property to a vector

Hi @,

I'm a newby to C++ in need of some help

I want to convert the latest 50 values contained in the CloseMD array property of the IEasyLanguageObject to a vector. This is what I came up with. But I don't think it's very effecient. I found an example of how to convert from an array to a vector, but this only gets me halfway.

Is it possible to convert this toi a vector without copying it?
How can this be done?

1
2
3
4
5
6
7
8
9
10
extern double __stdcall DoConversie 
( IEasyLanguageObject * pELObj, ) 
{ 
  vector<double> sig; 
  
  for (int i = 0; i < 50; i++) 
    { 
    	sig.push_back(pELObj->CloseMD[data1]->AsDouble[ i ]);
    } 
} 


Here is a link to the documentation of this object ;

https://www.google.nl/url?sa=t&rct=j&q=&esrc=s&source=web&cd=1&cad=rja&ved=0CDMQFjAA&url=https%3A%2F%2Fdeveloper.tradestation.com%2Fdocuments%2FEasyLanguage_Extension_SDK.pdf&ei=Fz8OUZGXL_GT0QWLmoDQDQ&usg=AFQjCNF0whadDmAkQbCtw3-73elwj7dlRg&sig2=-LtA1_BEuVUeU8rt33bqpg&bvm=bv.41867550,d.d2k

(sorry I couldn't find the hyperlink tag)

Thanks and best regards,

Simon
Topic archived. No new replies allowed.