#include <stdio.h>
#include <iterator>
#include <iostream>
using namespace std;

void ret_array(int *ret,  int amount){
    for(int i=0;i<amount;i++)
        //*(ret+i)=+1;
        ret[i]=i*2; // Simpler because arrays are already pointers: startloc + typesize*<index>
    
}
int* ret_array2(){
    static const int amount = 10;
    static int ret[amount];
    for(int i=0;i<amount;i++)
        *(ret+1*i)=i*3;
    return ret;
}
int main(){

    int new_array[10];
    ret_array(new_array,10); //Array is already a pointer, pointing to the first element;
    for(int i:new_array)
        cout <<"Number "<<i<<endl;

    int *arr2= ret_array2();
    for(int i=0;i<10;i++)
        cout <<"Number "<<arr2[i]<<endl;
    return 0;
}
