connect() function in C++ socket programming

Hello All,

I have a problem using connect(...) function in C++. I am using SSH from my windows system to connect it to linux server. The program works fine if I run it directly in Linux machine but I need it to run through windows machine.
The function returns -1 and so my program terminates.

Can anyone help? or tell me how to show the exact error in unix C++ program because I am getting '1076041180' error number and I can't figure what is the exact problem.

Thanks...

man perror

will help you decode error numbers

Incindentally the syntax for C sockets and C++ sockets is the same, you use the same system calls.

Can u give out more details.. What are the parameters you are passing to Connect() call.. That will surely help.. Check that against the connect API. usually people go wrong with the second parameter, the DS storing the address, port ..