If you need to test short pieces of C++ code or solve small C++ exercises, the online C++ editor from OnlineGDB can help you. No need to open a compiler or editor installed on your computer, just open quantrimang.com/cplusplus-editor-online and enter your C++ code to run and see the results right in the browser, even on mobile.
Online Cplusplus Editor has a fairly fast execution time, detects syntax-related errors right while typing code with a red X right on the error code line, colors the code… and runs right while coding by clicking go to Execute.
Hopefully with this online C++ compiler, learning C++ as well as writing code online will be easier for you.