'How to delete a previous cout in c++

I would like to know the generic way to do it. Therefore, imagine I print "hello world" and then I want to delete that line from the screen. How would you do it? Btw, is there a general way to do it? or there is a specific way depending on what you are trying to delete? Thanks in advance!



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source