How to connect to the internet in a C++ program

I'm fairly new to the world of programming, so sorry if this is a stupid question. I've taken a college course in C++ and while I'm by no means an expert, I understand most concepts in the language and can build small-scale, isolated programs that accomplish specific tasks. But what I didn't learn is how I can make a program do things on the Internet. What i want to do specifically is have the program look things up and then return the results. So basically let's say that the user inputs "apples" (just an example). Is there a way for the program to input "apples" into google, and return let's say the name of the first result? And also, would this work better as a web application or as a Windows desktop application? Or maybe even a mobile app? If there's no clear answer to this question, I could also learn from a guide or tutorial if one exists. Sorry again if this is a dumb question and thanks in advance for whatever help you can give.
Hi,

you may start with learning sockets

google for resources/tutorials :)
Topic archived. No new replies allowed.