How to return a global array from a function New comment [Deleted] 2022.02.15 12:10 Dear How can I return a global array by a function. Below my code, it give me a error struct OpenOrders { long orderId; string symbol; string side; }; OpenOrders _GetOpenOrders[]; void fill_array() { for(int x=0;x<=7000; x++) { if(IsStopped()) break; ArrayResize(_GetOpenOrders ,x+1 ); _GetOpenOrders[x].orderId = (long)_LastResponse_Jason[x]["orderId"].ToStr(); _GetOpenOrders[x].symbol = _LastResponse_Jason[x]["symbol"].ToStr(); } } OpenOrders RetrunArray() export { return(_GetOpenOrders); } Please anyone correct my code please Ugochukwu Mobi 2022.02.15 12:45 #1 You don't need to return a global array because You should be able to access it everywhere. New comment
Dear
How can I return a global array by a function. Below my code, it give me a error
Please anyone correct my code please