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

Code Example 1

cout << setw(10) << "ten" << "four" << "four" << '\n';
// Display ten       fourfour

cout << setfill('-') << setw(80) << "-" << '\n';
// Displays 80 "-"

Learn ReactJs, React Native from akashmittal.com