Right Justifying output stream in C++

You need to use std::setw in conjunction with std::right.

#include <iostream>
#include <iomanip>

int main(void)
{
   std::cout << std::right << std::setw(13) << "foobar" << std::endl;
   return 0;
}

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)