Skip to main content
Changed [] to {} in the array.
Source Link
ChrisG
  • 7.4k
  • 2
  • 17
  • 26

Your error comes from the way you call your function. Say we have the following function:

bool foo(int myArray[])
{
    // do your stuff here
}

You will call this function like that:

int tmpArray = [1{1, 2, 3];3} ;
foo(tmpArray); // and not foo(tmpArray[]);

Your error comes from the way you call your function. Say we have the following function:

bool foo(int myArray[])
{
    // do your stuff here
}

You will call this function like that:

int tmpArray = [1, 2, 3];
foo(tmpArray); // and not foo(tmpArray[]);

Your error comes from the way you call your function. Say we have the following function:

bool foo(int myArray[])
{
    // do your stuff here
}

You will call this function like that:

int tmpArray = {1, 2, 3} ;
foo(tmpArray); // and not foo(tmpArray[]);
Source Link
ChrisG
  • 7.4k
  • 2
  • 17
  • 26

Your error comes from the way you call your function. Say we have the following function:

bool foo(int myArray[])
{
    // do your stuff here
}

You will call this function like that:

int tmpArray = [1, 2, 3];
foo(tmpArray); // and not foo(tmpArray[]);