hello to all,
#include<iostre am.h>
#include<conio. h>
#include <strstream.h>
void main()
{
clrscr();
strstream str;
char *a = new char[50];
int i;
cin >> i;
ostrstream s;
s<<"\nvalue of i is "<<i<<ends;
cout<<"\nIn s we have"<<s.str();
str<<i<<ends;
cout<<"\nusing rdbuf "<<str.rdbu f();
getch();
}
correct me if i am wrong.
Is Strstream is just used for converting interger and formatting it into strings.
what is the difference between "s.str()" and "str.rdbuf( )" ?
the output is the same.
Did strstream have anyother functions.
I checked c++ library , but i cannot understand a word.
thankyou in advance,
vishnu
#include<iostre am.h>
#include<conio. h>
#include <strstream.h>
void main()
{
clrscr();
strstream str;
char *a = new char[50];
int i;
cin >> i;
ostrstream s;
s<<"\nvalue of i is "<<i<<ends;
cout<<"\nIn s we have"<<s.str();
str<<i<<ends;
cout<<"\nusing rdbuf "<<str.rdbu f();
getch();
}
correct me if i am wrong.
Is Strstream is just used for converting interger and formatting it into strings.
what is the difference between "s.str()" and "str.rdbuf( )" ?
the output is the same.
Did strstream have anyother functions.
I checked c++ library , but i cannot understand a word.
thankyou in advance,
vishnu
Comment