Exemplo n.º 1
0
    FSString::FSString(const FSString& rhs) : FSValue(rhs), buffer(0), strLength(0), bufferLength(0)
    {
        strLength = rhs.length();
        bufferLength = strLength + 1;
        buffer = new char[bufferLength];

        if (bufferLength > 0 && buffer == 0)
            throw FSAllocationException("Cannot allocate memory to copy an FSString.");

        strcpy(buffer, rhs.buffer);
    }