I'm back with yet another segfault i can't seem to conquer.
I have figured out exactly what it is, it's something with the char* string line. I use it to break up the bytes to GET this pdf file for a school assignment.
Any and all help is appreciated!
void* consumer(void *temp)
{
int* stuff = reinterpret_cast<int*>(temp);
int x = *stuff;
char* string[];
stringstream stream1;
stringstream stream2;
int temp1=0;
int temp2=0;
int sent1=0;
int sent2=0;
ofstream fout;
strcpy(string,request); //SEGFAULT(11) ON THIS LINE, WHEN CALLING "string"
strcat(string,"Byte Range: ");
...
The complete code can be found here; https://www.dropbox.com/sh/dt90ot3z4v5nruy/1H9a5Cyb5A mgetweb.h and mgetweb.cpp