Mega Code Archive

 
Categories / C++ / Console
 

Predefine format for cout

#include <iostream> using namespace std; ostream &tabs(ostream &stream) {   stream << '\t' << '\t' << '\t' ;   stream.width(20);   return stream; } int main() {   cout << tabs << "Testing\n";   return 0; }