I am kind of a neophite and I need your help in the following;
How do you right justify the field output in the <iostream> headerfile and how would one determine the compiler one is using/
cplspls
0
Newbie Poster
Recommended Answers
Jump to PostThe answer to the first question is easy
#include <iostream> #include <iomanip> using namespace std; int main() { cout << right << setw(20) << "Hello\n"; }
For the second question, there is no portable way to do that. Some compilers pre-define macros that indicate the compiler and …
All 2 Replies
Reply to this topic
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.