The difference is due to the fact that when you write cout<<"Hellow World"<<endl; the non-member overload of const char* is chosen to print the string literal.
When you call the member version, the best fit is only the void* overload.
nr: #2 dodano: 2017-01-01 15:01
what is the difference between cout.operator<<("Hellow World"); and
operator<<(cout, "Hellow World");
When you write cout.operator<<("Hellow World"); you are calling the operator<< method and passing a const char *. Because this method is not overloaded to take a const char *, but is overloaded to take a const void *, that's the one you call and get 0x8048830 (which is the address of the 'H' character in your string).
When you write operator<<(cout, "Hellow World") you are calling a free function operator<< that takes an output stream on the left-hand side and a const char * on the right-hand side. There happens to exist such a function, and it has the following declaration (simplified):