C++ confusing compilation errors
<p>Below is the compilation errors I'm getting and the header/cpp files that go with em. If anyone has a few minutes and a better eye at catching something that I can't, I would love them forever. This goes back to an a3main.cpp to be tested, so if you need that file fir reference as well just give me a shout. Thanks again!</p>

<pre><code>a3.cpp: In constructor 'disk::disk(int, const char*)': 
a3.cpp:12: error: invalid conversion from 'const char*' to 'char*' 
a3.cpp:12: error:   initializing argument 1 of 'char* strcpy(char*, const char*)' 
a3.cpp: In member function 'void disk::memory(int)': 
a3.cpp:26: error: expected unqualified-id before '=' token 
a3.cpp:28: error: expected primary-expression before '==' token 
a3.cpp: At global scope: 
a3.cpp:37: error: expected initializer before 'mode' 
a3.cpp:42: error: expected initializer before '*' token 
a3.cpp:47: error: expected initializer before 'get_segment'
</code></pre>

<hr>

<pre><code>//a3.cpp
#include &lt;iostream&gt;
#include "disk.h"
#include &lt;iomanip&gt;
#include &lt;cstring&gt;
#include &lt;stdlib.h&gt;
using namespace std;

disk::disk(int num_of_segments, const char* mode)
{
    memory(num_of_segments);
    if(strcmp(mode, "w") || !strcmp(mode, "a"))
        strcpy(mode, mode);

    else
        strcpy(mod, "w");
}   

disk::disk()
{
    memory(20);
    strcpy(mod, "w");
}

void disk::memory(int num)          //private, see header file
{
    segment = new segment[num];
// (nothrow) - page 80 in the text
    if(segment == NULL)
    {
        cerr &lt;&lt; "Could not find any data in class ";
        exit(0);
    }
    total = num;
    count = 0;
}

const char* disk::get mode() const
{
    return mode;
}

segment segment* disk::get_all_segment() const
{
    return sgmt;
}

int disk::segment get_segment(int pos) const
{
    segment temp;
    if(pos &gt; 0 &amp;&amp; pos &lt; count)
    {
        temp = segment[pos];
    }
    return temp;
}

int disk::get_segment_count() const
{
    return count;
}

disk disk::operator+=(const segment &amp;r)
{
    if(count &lt; total)
    {
        sgmt[count] = r;
        count++;
    }
    return *this;
}

void disk::operator=(const disk &amp;r)
{
    if(*this != &amp;r)
    {
        if(sgmt != NULL)
            delete[] sgmt;
        memory(r.total);
        for(int i=0; i &lt; r.count; i++)
        {
            sgmt[i] = r.sgmt[i];
        }
        count = r.count;
        strcpy(mod, r.mod);
    }
}   

disk::disk(const disk&amp; copy)            //copy constructor
{
    memory(copy.total);
    for(int i=0; i&lt;copy.count; i++)
    {
        sgmt[i] = copy.sgmt[i];
    }
    count = copy.count;
    strcpy(mod, copy.mod);
}

disk::~disk()
{
    if(*sgmt != NULL)
    {
        delete[] sgmt;
    }
}

//disk.h
#include "segment.h"
#include &lt;iomanip&gt;
#include &lt;cstring&gt; class disk {
    private:
        segment *sgmt;
        char mod[3];
        int count, total;
        void memory(int);
    public:
        disk(int, const char *);
        disk( );
        const char* get_mode( ) const;
        segment get_segment(int) const;
        int get_segment_count( ) const;
        const segment* get_all_segments( ) const;
        int access(const char [ ]);
        disk operator+=(const segment &amp;);
        void operator=(const disk &amp;);
        disk(const disk &amp;);
        ~disk( ); };

//segment.h
class segment
{
    private:
        char data[SIZE][41];
    public:
        void initialize(const char [][2000], int);
        void initialize();
        int match(const char []);
        void sort();
        void get_word(char [], int);
        int set_word(const char [], int);
        int set_char(int, int, char);
        char get_char(int, int);
};
</code></pre>
