Check out example codes for "c++ press any key". It will help you in understanding the concepts better.

Code Example 1

// On Windows:
system("pause");

// and on Mac and Linux:
system("read");

Learn ReactJs, React Native from akashmittal.com