Question: I am trying to write a program which prints the cubes of inserted elements of array, and then prints the sum of elements divisible by 2, and not divisible by 3.

```
#include <iostream>
#include <math.h>

using namespace std;

void kub(int *niz[], int n)
{
    int i=0;

    while(i<n)
    {
        *niz[i]=pow(*niz[i],3);
        i++;
    }
}

void unesi(int* niz[],int n)
{
    int i=0;

    while(i<n)
    {       
        cin>> *niz[i];
        i++;
    }
}

void stampaj(int* niz[],int n)
{
    int i=0;

    while(i<n)
    {
        if ((*niz[i]%2)==0 && (*niz[i]%2)!=0)
            cout<<*niz[i]<<endl;

        i++;
    }
}

int main()
{
    int n;
    cin>>n;
    int niz[n];

    unesi(niz,n);  /* <<= here */
    kub(niz,n);
    stampaj(niz,n);
    return 0;
}

```

Everything is fine, until this line of code (marked "**<<= here**"): "unesi(niz,n);" What am I doing wrong?

Answer: 
Instead of:

```
void unesi(int* niz[],int n)

```

try:

```
void unesi(int niz[],int n)

```

`niz[]` decays to pointer, so no need to pointer to pointer

Same for the other functions. Last note, instead of `cin>> *niz[i];` just use `cin>> niz[i];`
In C++,

```
int* nix[]

```

is actually translated into

```
int** nix

```

at compile time. To fix this you can use either

```
int* nix
int nix[]

```

Also in the function body you would probably need to change

```
*nix[i]

```

into

```
nix[i]

```