My problems are more of porting a code to Windows, than the code itself. I need to download a file from a URL ( http://127.0.0.1/img.jpg ) and store it in a local file.
I think I've screwed up the setting up of the libcurl libraries. I am using Visual Studio 2008 as my IDE.
I first downloaded the zipped file with the libraries. I downloaded the file from here: http://www.gknw.net/mirror/curl/win32/curl-7.20.0-devel-mingw32.zip
The description on the libcurl site said:
"This package is type libcurl This is a pure binary libcurl package, possibly including header files and documentation, but without the command line tool and other cruft. If you want libcurl for a program that uses libcurl, this is most likely the package you want."
Which fits in to what I want to do.
In my Visual Studio options, I added the libcurl folder in the 'include' path. I also added the bin folder (with all the .dll files) to my 'libraries' path.