Check out example codes for "system("pause") note working c++". It will help you in understanding the concepts better.

Code Example 1

#include <cstdlib> // use this header in order to include `system` in `main`
#include <iostream> // use this header in order to include `cin` in `main`

Learn ReactJs, React Native from akashmittal.com