I\'m working in C++. I\'m given a 10 digit string (char array) that may or may not have 3 dashes in it (making it up to 13 characters). Is there a built in way with the st
You need to use std::setw in conjunction with std::right.
#include #include int main(void) { std::cout << std::right << std::setw(13) << "foobar" << std::endl; return 0; }