My professor reported me for copying off a past students' programming assignment, which I don't even have access to, for these two lines in the middle:
void write(void *data, int *length)
{
char *filedata = new char[*length+1]; // the two lines in question
strcpy(filedata, (char*)data);
...
}
I thought these two lines of code are fairly simple, as I have learned them in a previous class. I have to go to a formal hearing. Any thoughts on how I should proceed?