First off, C++ does not know anything about the I/O device you are using. It can be a keyboard and monitor, or a file, or a network connection, or anything which can do I/O. What that means is that there is no standard way to do this in C++.
That said, the following should work on any Unix/Linux platform and on any version of Windows. That's because it cheats by using another program to clear the screen.
All Unix/Linux systems have a command line program called "clear" which clears the screen.
Likewise, all Windows systems have a command line command called "cls" to do the same.
This works by first trying one, and if that doesn't work, then using the other. The order in which they are tried does not matter.