Check out example codes for "c++ print to standard error". It will help you in understanding the concepts better.

Code Example 1

#include<iostream>

int main(){
	std::cerr << "this is a message for stdandard error" << std::endl;
  	return 0;
}

Learn ReactJs, React Native from akashmittal.com