Q:

Arduino - Creating an Array from instances and assigning value [C++]

I searched for a lot of resources on C++ and arrays. I learned that arrays act like pointers in c++ and I am confused on how to create a multi-dimensional array and assigning value to indexes. I usually code in Java and Python but know I am working with an Arduino and I need to learn c++.
My Arduino(c++) code regarding about this array is:
#include "Arduino.h"
#include "cell.h"
#include <cell.h>

cell maze[16][16];
cell * current = new cell(1, 1, 0, false, 0);
cell * end_pt = new cell(1,1,1,true);
maze[15][15] = end_pt;

My .h and .cpp files;
#include "Arduino.h"
#include "cell.h"

#include "Arduino.h"

cell::cell(){
    right = 0;
}

cell::cell(int r, int l, int f, bool inf){
    right = r;
    left = l;
    forw = f;
    info = inf;
    value = 70;
    printf("%d\n", right);
    printf("%d\n", left);
    printf("%d\n", forw);
    printf("%d\n", inf);
    printf("%d\n", val);
}

cell::cell(int r, int l, int f, bool inf, int val){
    right = r;
    left = l;
    forw = f;
    info = inf;
    value = val;
    printf("%d\n", right);
    printf("%d\n", left);
    printf("%d\n", forw);
    printf("%d\n", inf);
    printf("%d\n", val);
}

void cell::setR(int r){
    right = r;
}
void cell::setL(int l){
  left = l;
}
void cell::setF(int f){
  forw = f;
}
void cell::setI(bool inf){
    info = inf;
}
void cell::setV(int val){
    value = val;
}
int cell::getR(){
    return right;
}
int cell::getL(){
    return left;
}
int cell::getF(){
    return forw;
}
bool cell::getI(){
    return info;
}
int cell::getV(){
    return value;
}

#ifndef cell_h
#define cell_h

#include "Arduino.h"
class cell{
  public:
    cell();
    cell(int r, int l, int f, bool info);
    cell(int r, int l, int f, bool info, int val);
    void setR(int r);
    void setL(int l);
    void setF(int f);
    void setI(bool inf);
    void setV(int val);
    int getR();
    int getL();
    int getF();
    bool getI();
    int getV();
  private:
    int right;
    int left;
    int forw;
    bool info;
    int value;
};

#endif

'maze' does not name a type is my error. Please help and thank you in advance!

A:

There's a problem with this line:
maze[15][15] = end_pt;
maze[15][15], and any other object in maze, is of type cell
end_pt is of type cell*
This means you are trying to assign two different types.
Instead, do this:
cell end = cell(1,1,1,true);
maze[15][15] = end;

or just
maze[15][15] = cell(1,1,1,true);

Since you are using C++, consider looking into std::array instead. And avoid new/delete when possible.

