Possible Duplicate:
What's the difference between cout<<cout and cout<<&cout in c++?
I accidentally found:
cout << cout;
The output is some address. What does this address mean, and why is it shown?
I am looking this question.
Thanks
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Because
ostreamoverloadoperator void*(), and that’s the closes match for the call tooperator <<, the result of the cast(void*)coutis printed. Which in your case is that address. Remember thatcoutis an object.Basically the call translates to: