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

Code Example 1

/*there are 2 ways of doing it.*/
#include <iostream> // including the main thing needed
int main(){
  std::cout << "Text here.";
  //you could put using namespace std; so you just have to do
  cout << "Text Here.";
  //this isnt reccomended though.
  //is also an option.
  return 0;

Code Example 2

#include <iostream>

int main() {
  std::cout << "Hello, World!"; // prints 'Hello, World!' to the output.
  return 0;

Learn ReactJs, React Native from