As a fun side project for my C++ education, I want to learn how to download a txt file from the internet using visual studio. The file I want to download is http ://data-root.illyriad.co.uk/datafile_worldmap.txt (I put a space in there because the file is really big and might crash your browser if you click on it.)
I have already scoured the internet to find usable code. The code which I found I have pasted below, but it doesn't work. I don't know anything about these libraries or how to use them, so I have come here for assistance.
The problem with the code is the #include's I believe. I don't think I have ever seen them written like that before, so I am not sure what they are meant to do differently.
I'm sorry, I may need some further clarification. szUrl[] is the downloaded url, and szOutput[] is the location it is saved to correct? The code should print one of the three cases, correct? On my computer, it does not print any of these cases. Might #define _CRT_NONSTDC_NO_WARNINGS be blocking warnings windows is giving me which might tell me why this doesn't work for me? I am using Windows 7. Just taking a wild guess I thought I might have to do something with admin privileges, but running visual studio with admin privileges doesn't make this program work.
Edit: I got it to work! I just changed the internet address and the download location, and it worked. Thanks so much for your help.