I have a question and I was hoping someone could point me in the right direction.

I know the IP address of a server I want to download a file from, and I know the path on the client hard disk I want to download it to. How could I use C++ to download a file? I have http, ftp or any other protocol available on the server. Should I start brushing up my TCP/IP knowledge?

>Should I start brushing up my TCP/IP knowledge?
Yes, unless you want to write a wrapper program.

wget is a program that simply gets a file from a url, and if you used a system() call to it, it would work. There's also a Windows version of wget at your disposal.

Hmm.. if you want to code this thign from scratch, you need to use some socket library. (like winsock for windows)

Maybe looking at this thread would help a bit:
http://www.daniweb.com/techtalkforums/thread50205.html

Hope it helped, bye.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.