I think I need to get my head wrapped around strings better first. I thought I had a grasp on what * was used for. But I am seeing it used in contexts I don't understand. I can see now why people pick python over C, but I really want to get a handle on this.
Example that I get:
But then I see this for example, does this mean its passing a reference?Code:a = '6'; b = &a; // points to the mem address c = *b; cout << c; // should return 6
Also when you say "expecting a (non-const) char*" do you mean the function is expecting a pointer and not the real content. Such as my example, its expecting the var c not a?Code:int main(int argc, char* argv[])




Reply With Quote