string line = "blerdy blah";
for (int i = 0; i < string.size(); i++)
{
line[i] != "n";
}
With this I get the error "cannot convert from char to const char *"
If I replace the last line with
line[i] != *"n";
It works. I get why in one sense, I'm dereferencing a pointer. What I don't get is why it's a pointer in the first place. Is any char written like this actually a pointer to one char somewhere? Like the program has one set of every symbol somewhere and this is what I'm pointing to?
If this is the case, can I do silly things like make the 'n' pointer point to something else?