M
markengley
Hi everyone hope you are all ok.
Just learning C++ (as you can tell from the noob question Im about to
ask). One symbol/function/assignment/whatever really bothers me which
is the "<<" one.
I saw this line of code:
#define IN_VALIDINPUT (1 << 16)
And its meaning totally stumps me. I know that << gets used for like:
cout << "My name isnt Ishmael";
and that these can stack up:
cout << "My name isnt Ishmael, Its " << name << "You fool.";
but I dont understand if these 2 contexts for << are even the same. I
also know that there is a similar thing just the opposite facing (>>)
but again the use stumps me.
Sorry if this is a silly line of questioning but searching for
anything on the topic of "<<" throws up endless tutorial programs full
of:
cout << "Hello World^42";
could really do with some guidance.
Just learning C++ (as you can tell from the noob question Im about to
ask). One symbol/function/assignment/whatever really bothers me which
is the "<<" one.
I saw this line of code:
#define IN_VALIDINPUT (1 << 16)
And its meaning totally stumps me. I know that << gets used for like:
cout << "My name isnt Ishmael";
and that these can stack up:
cout << "My name isnt Ishmael, Its " << name << "You fool.";
but I dont understand if these 2 contexts for << are even the same. I
also know that there is a similar thing just the opposite facing (>>)
but again the use stumps me.
Sorry if this is a silly line of questioning but searching for
anything on the topic of "<<" throws up endless tutorial programs full
of:
cout << "Hello World^42";
could really do with some guidance.