Libcurl *file;
This creates a pointer. It is currently pointing at some random memory somewhere.
if(file->Connect(...
This attempts to use that random memory somewhere as if it were a proper Libcurl object, which it is not. It is some random memory somewhere with random junk in it.
To use a Libcurl object, you have to actually make one first. Then, you make the pointer point at it.