I/O stream:
#include<iostream> using namespace std; int main(){ char name[50],age; cout<<"enter name:"; cout<<"Age:"; cin>>name>>age; cout<<"Name: "<<name<<endl<<"Age: "<<age<<endl; return 0; }
cerr:
#include<iostream> using namespace std; int main(){ char str[]={"unable to read"}; cerr<<"Error msg: "<<str<<endl; return 0; }
clog:
#include<iostream> using namespace std; int main(){ char str[]={"unable to read"}; clog<<"Error msg: "<<str<<endl; return 0; }