Yes, but the exact details of how to do it are going to vary based on the cloud storage provider. In some cases, where you don't need to use an account, it's as simple as sending an HTTP POST message (which you could do through libcurl). I imagine for the stated cloud storage providers, it's going to bit more involved depending on how they want you to authenticate with them.
some of these can be mounted as a drive locally and just directly written to, I think. It may take some hackery to get there, but its doable. I had dropbox doing that at one point.
otherwise you need to do what was already said, and find an API or SDK to get it done.
I have that c++ library and as I couldn't find a tutorial on how to use I am trying to understand the codes and get it to work and see if it is good or not
I have been trying to upload a file to dropbox using culr but all that it does is just create new files and folders and I am still waiting for a solution response in the link above
I will check out pcloud c api and see what can it do
As a note, I have found a mega official sdk here https://github.com/meganz/sdk, but like every other api that I might find don't know how to use them yet, and haven't yet found a c++ code example using mega c++ sdk