Q:

Copy consutrctor w/ multiple pointers

I am trying to create a copy constructor for a class with pointer variables. Something is going wrong with the copy construction though, as I segfault when I try to access pointers in my new object...
/* Copy Constructor */ 
Solver::Solver(const

 Solver &obj)
    {
    // Pointers to use in modified-Midpoint method.
    double *m_yTemp1 = new double[CONST_numVariables];
    double *m_yTemp2 = new double[CONST_numVariables];
    double *m_dTemp  = new double[CONST_numVariables];

    // Triple pointer to store tableau of data for extrapolation.
    double ***m_extrapTableau = new double**[CONST_maxDiv];
    *m_extrapTableau          = *obj.m_extrapTableau;
    for(int i=0; i<CONST_maxDiv; i++)
    {
        m_extrapTableau[i]  = new double*[i+1];
        *m_extrapTableau[i] = *obj.m_extrapTableau[i];
        for(int j=0; j<=i; j++)
        {
            m_extrapTableau[i][j]  = new double[CONST_numVariables];
            *m_extrapTableau[i][j] = *obj.m_extrapTableau[i][j];
        }
    }
    // Pointer of step sizes for extrapolation of modified-Midpoint.
    double *CONST_extrap = new double[CONST_maxDiv];
    for(int i=0; i<CONST_maxDiv; i++)
    {
        CONST_extrap[i] = 2.*(i+1.);
    }

    // Change pointer of new object from already used memory to newly allocated. 
    *m_yTemp1     = *obj.m_yTemp1;
    *m_yTemp2     = *obj.m_yTemp2;
    *m_dTemp      = *obj.m_dTemp;
    *CONST_extrap = *obj.CONST_extrap;
}

My initial questions are: 

If I have other non-pointer variables in the class, are they automatically copied or do I need to specify them as well?
How do I deal with passing the address of double or triple pointers? I think I may be doing this wrong.
If CONST_numVariables and CONST_maxDiv are constants set in the class, can they be used in this copy constructor, assuming that they have been set when I copy an object? 

A:

The problem with your segfault is here:  
double ***m_extrapTableau = new double**[CONST_maxDiv];  // (1)
*m_extrapTableau          = *obj.m_extrapTableau;        // (2) 

In (1) you DECLARE a variable m_extrapTableau LOCAL to your constructor.
But in (2) I can see that you have a class membber with the same name.  So the local m_extrapTableau of your constructor will be properly intialised.  But it hides the class member that will remain uninitialized for subsequent uses. 
About your remaining questions: 
1) if you implement a copy constructor, you have to take care of copying everything you need.  
2) passing adress of double or tripple pointers requires you to iterate through each level initializing the pointers correctly before using any element of your table. You should consider using vectors of vectors or vectors of vectors of vectors.  These a much more easy to initialise, copy, etc... 
3) if they are const and you didn't initialize them to another value with a brace initializer they should be usable as such.  

