* Beginner in C++

I have a class, say 

```
class A
{
  public:

  int N;
  double ..... 
};

```

But I would like the ..... to define a matrix of size depending on N. In case that changes the approach, it is a non-identical function of N and not just N itself, say N^3+1.

* In case that is the approach, I have never written a constructor of an object in C++. Therefore, if this is the approach could you please give some detail. I don't understand how it might work. When the class is instanciated, maybe the property N hasn't been even initialized.
* I am not clear how to get a matrix or array (I am still not clear of the basic data types of C++) of size determined in execution.

**Edit:** The value of N is determined later in the code. It is something like:

```
A InstanceOfA; //The variable InstanceOfA is declared of type A.
...
Some other stuff happens, e.g. other properties of InstanceOfA are initialized 
and some of the functions are used. And then:
...
A.setN(4);

```

I didn't understand from the answer below. Would I need to do 

```
A InstanceOfA(4);

```

?