Hey, I'm trying to upload a file to a FTP server using c++. The code works fine but it just will not connect / upload the file.

I am using tripod, could this be the issue? Does anyone know any FTP sites that will allow me to upload please? Thank you

On most operating systems, you should be able to setup a 'local' ftp server to test the functionality. If you have a local network with at least one other computer, maybe you could setup an FTP server there.

I am not presently aware of any computers 'in the wild' that will just let you upload. Most systems require authentication (to make sure that you are authorized to upload). In several cases, the permission to upload is related to a subscription of some kind.

Well... without actually seeing any source code, it's pretty hard to tell whether the problem lies in your code or elsewhere. Try setting up an ftp server on your local workstation, test to make sure the setup works by using a proven FTP client (such as Filezilla), then test with your client. If it fails, there's a problem with the way you wrote your client. If it works, you've got some other network issues (possibly passive/active FTP, in combination with NAT).

Are you behind NAT?

Also keep in mind, I think FTP uses 2 ports (not just 1). 21 and 20.... 21 for all the commands, and 20 for actual data transfer.

Is this being done with some external program? I wasn't aware c++ could upload files... lol


Umm...what do you think external programs are written in? (ok so maybe they're not c++, but someone had to write them in something).

If you want to write c++ to do file transfers, it is certainly possible. This appears to be the original poster's goal.

Your comment seems somewhat less than helpful.