Sign in to follow this  

interesting ostream question

Recommended Posts

After reading this page about operator<< for ostreams, I noticed that there aren't any overloads for const references. So how then does an ostream handle code like this?:
writer << "some text\n";
writer << 1234;
Notice how 1234 is a const int, so how does that work? Just curious is all [wink]

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this