How I can use a SOCKS proxy from my C++ socket program?
Your question is a bit vague, but I'll try to answer it anyway.
If found these links that might help you:
Using the SOCKS RFC and the cited links, you might be able to create a SOCKS proxy.
I don't like posting links as an answer but since you don't clearly state what you want to achieve, I can't really be more accurate...