-1

Hello,

I'm working on a stock trading assignment. I have developed the algorithm for trading, and now I need a little help on getting the data from a server.

There's a server that replies to the following request:
servername stockcost <stockname>

and I assume I can use it like:

int currentCost = servername stockcost <stockname>;

but I do need some way to connect to the server, so there should be some CPP libraries. Anyone can point me to places where I can get more info on working with a remote machine in CPP? thank you!!!

2
Contributors
1
Reply
4
Views
10 Years
Discussion Span
Last Post by John A
0

I don't really know that much about sockets, so I may be wrong. I haven't been able to find any C++ network stream sockets, however there's plenty in C which you can call from your program. If you want to learn socket programming from scratch, start with Beej's Guide To Network Programming.

You may find the low-level coding difficult. If so, you may want to make the procedure easier by using libcurl which isn't as powerful, but it's fine for retrieving HTML and other files from a web server.

Hope this helps

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.