Check out example codes for "clear console c++". It will help you in understanding the concepts better.

Code Example 1

system ("CLS");

Code Example 2

#include <Windows.h>

int main() {
	//print stuff
    
	system("cls"); // clear console
}

Learn ReactJs, React Native from akashmittal.com