I initialized a char *mode at around 3:09, is that what you mean?
You’re right that it would be dangerous! But clang would have assumed a type of int and complained when I tried to assign mode = optarg, so the compiler is looking out for us at least a little :)
Not initializing
modeseems dangerous, although it’s probably fine in main(), I guess?I initialized a
char *modeat around 3:09, is that what you mean?You’re right that it would be dangerous! But clang would have assumed a type of
intand complained when I tried to assignmode = optarg, so the compiler is looking out for us at least a little :)No, you did not initialize it.
And yes it is dangerous, main() or not.
oh, you’re right! s/declare/initialize in my brain.
Yeah, a dangerous mistake.