Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9143515
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T10:02:36+00:00 2026-06-17T10:02:36+00:00

I supposed it would be much easier, but I cant use a two-dimensional array

  • 0

I supposed it would be much easier, but I cant use a two-dimensional array as parameter in a simple mql4 function and insert elements in it. I don’t know where the problem is.

I have a function declared like this:

void insert_array_in_multi(double simple_array[], double &multi_array[][]){

...
ArrayResize(multi_array,1);

ArrayCopy(multi_array[x][0],simple_array); // Here I want to copy the one-dimension array into the multidimensional one, in "x" position. And here is where I get the ERROR when executing.

// I use "multi_array[x][0]" because is the way I don't get errors when compiling; if I use  "multi_array[x]", meaning I want the one-dim array to be copied in the x pos of the multi-dim array, I get the error message "wrong dimension"

...
}





The other function calling this one, is like:

double bidiarray[0][10];

... as I put new elements, I resize the array to an array with 10 or more (primary) elements

... create a one-dimensional array like this:

double simple_array[10] = ...

... and then call to the previous function:

insert_array_in_multi(simple_array,bidiarray);

...

}

The error message I get is “1 parameter for ArrayCopy function must be array”… But, it is… Isn’t it?

Somebody knows how to do it?

Thanks in advance.

PD: It fails when executing, not when compiling

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T10:02:37+00:00Added an answer on June 17, 2026 at 10:02 am

    I tried testing function with following signature and it compiles, so I think it will work. Give it a try:

    int foo(int something[][])
    {
       return (0);
    }
    
    int somenumber[5][5];
    somenumber[0][0]=7;
    foo (somenumber);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I would like to know what I'm supposed to do in the case of
Supposed I have a class called TrafficLight and I would like to have a
Supposed I have the following string: string str = <tag>text</tag>; And I would like
I suppose similar problem would have been discussed here, but I couldn't find it.
I am supposed to create an actually kind of simple table with data from
I'm creating a script that's supposed to create an embedded SWF and also use
I'm really confused - but really it's pretty wierd because I know two programming
I have an array of Card instances. Card[] allCards; I am supposed to get
See, the problem is that I'm supposed to use an executable driver program (vdriver)
Suppose I would like to round up float to int in Java . For

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.