Recently I've been watching "Intro to C++" videos, some of which do a better job of explaining certain concepts than others. However, there is something none of the videos have addressed and that is the meaning of the carrot brackets.
Ex:
int main(){
cout << "Hello World" << endl;
return 0;
}
I'm only interested in the first line of the above function. If I'm understanding correctly, cout prints the variable or value that follows, while endl indicates the end of the line while representing "\n"
.
I've googled C++ operators and keywords, and this appears in the lists of neither, although << apparently also serves as a binary left shift operator...
To clarify I'm coming from a Python/Java background so I'd expect a comma or addition sign. I want to know if << is the equivalent of these or does something similar but different.
Thanks.