15
If cout is an object of ostream class, then why can't we declare our own object, say, 'out' from the same class. i.e, isn't the following code supposed to work??
#include<iostream>
using namespace std;
int main()
{
ostream out;
out<<"something";
}
or otherwise
#include<iostream>
using namespace std;
int main()
{
ostream_withassign out;
out<<"something";
}