I'm getting a segmentation fault and I don't know how to fix it. I have narrowed it down to where it's occurring but I don't know how I am causing it. From my understanding a Segmentation Fault has something to do with the program either accessing illegal data or trying to illegally overwrite data.

I'm going to post my code but be warned, it's really long and I understand if you don't want to help.

There are 4 files (2 header and 2 .cpp). The first two are the driver programs that I was given. The last two are the files that I created to allow the driver program to work.

Here's where the problem is. In:

Code:
//strdrv.cpp (driver program)

void test10()

    {

    system("cls");

    cout << "10. Testing: String concatenation." << endl << endl;

    csis << "10. Testing: String concatenation." << endl << endl;

    String s10("DEF");

    String t10('H');

    String u10("ABC" + s10 + "G" + t10 + 'I');

    u10.setName("u10");

    u10.print();

    String v10('X' + u10);

    v10.setName("v10");

    v10.print();

    wait();

    }
In bold is where the Seg Fault is occuring. Adding all of strings, objects, and char's together is calling some friend functions that I created in //string.cpp.