cURL is the library which is used to do HTTP/FTP and similar protocols.
There is a decent binding cURLpp for C++ which would be best for what you want.

PS: C++ language as such do not have such functionality.

IMO C and C++ are poor languages for doing web stuff. It will be a lot simpler to use a language that is suited for that kind of programming.

This question has already been answered. Start a new discussion instead.