It's no less than a modern miracle ...
There are many ways to write, compile, and debug your C/C++ code. One popular option is to use an IDE (Integrated Development Environment) which allows you to do all of those in one single program.