Questcion about C++

Hello.I'm kind of new to programming,I'd like to know :
Can you create a program wich for example,disconnects and then connects back to the internet ? Like running a program and then automatically pressing buttons.I hope you understand :D Thank you.
Programs don't connect and disconnect to the Internet. That's a whole different world. You can write a program that can operate over the Internet, though. It all depends on what you want to do.
The only way a PC "connects" and "disconnects" to the internet is:

1. Disabling the Network Card
or
2. Network Cable is Unplugged/Wifi Network Unreachable

About pressing buttons, they can be "Emulated", and depending on how you emulate them it can be recognized as a real keypress or not.

Every program you use has been made through programming.

Chrome, Firefox, IExplorer, our HTTP Servers...
Office Suite, all Games...

It all comes to a point where single assembly instructions are executed, and as people does not use Assembly anymore, they look for a programming language like C/C++/Whatever .
Winsockets?
Yes you can create a program to do this. The easiest way to achieve this is to change the gateway IP address to a localhost address. All other network traffic should work fine except the Internet connection.

To the other guys posting solutions, please ensure your facts are correct before posting a solution. While this is a networking and programming question what he asks is possible in numerous ways.
Last edited on
Topic archived. No new replies allowed.