Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

hello. i have this code and am getting an fatal error: symbolreferencing error.

ID: 3610303 • Letter: H

Question

hello. i have this code and am getting an fatal error: symbolreferencing error. I don't understand what this error means. oreven how to fix it. thanks in advance for the help. #include <cstring>
#include "stringbuffer.h"

namespace pointer_exercise
{
stringbuffer::stringbuffer(const char *s)
{
    array_length = 0;
    array_length = strlen(s) + 1;
    buffer = new char[array_length];
    strcpy(buffer, s);
}

void stringbuffer::append(const char *s)
{
    int length;
    length = strlen(buffer) + strlen(s) + 1;
    char array [length];
    strcpy(array, buffer);
    strcat(array, s);
    delete[] buffer;
    buffer = array;
    array_length = length;
}

void stringbuffer::reset()
{
    char t [1];
    t[1] = 0;
    delete[] buffer;
    buffer = t;
    array_length = 1;
}

const char * stringbuffer::value() const
{
return buffer;
}
} hello. i have this code and am getting an fatal error: symbolreferencing error. I don't understand what this error means. oreven how to fix it. thanks in advance for the help. #include <cstring>
#include "stringbuffer.h"

namespace pointer_exercise
{
stringbuffer::stringbuffer(const char *s)
{
    array_length = 0;
    array_length = strlen(s) + 1;
    buffer = new char[array_length];
    strcpy(buffer, s);
}

void stringbuffer::append(const char *s)
{
    int length;
    length = strlen(buffer) + strlen(s) + 1;
    char array [length];
    strcpy(array, buffer);
    strcat(array, s);
    delete[] buffer;
    buffer = array;
    array_length = length;
}

void stringbuffer::reset()
{
    char t [1];
    t[1] = 0;
    delete[] buffer;
    buffer = t;
    array_length = 1;
}

const char * stringbuffer::value() const
{
return buffer;
}
}

Explanation / Answer

please rate - thanks I hope this helps You've defined this nice class, and functions to go with it, butyou have no main program that uses them int main() {code to use all this nice stuff return 0; }