I understand that by using getline, I can capture multiple words in a string. What is NOT clicking for me is how to read a string from a text file up to the end of the line...
Say I have a text file that has multiple lines like this:
a aaa aaaa aa
b bbb bbbb bb
c ccc cccc cc
what is it in the getline function that signals the end of a line (carriage return)?
std::getline will by default read until a newline character. That's the default behavior. You have to specifically give it a different character to read until if you don't want that default behavior.
So even though I can't see an end line in the text file
Your text editor treats the newline character as a line separator and uses it to separate the lines. If you want to actually see the newline character, you should use a hex editor.