with
i know i can test forCode:int main (int argc, char *argv[])
and it will return false. but can i test forCode:if (argv[argc])
and know that it will safely return false? i don't think so, but i'm not sure...Code:if (argv[argc + 1])
with
i know i can test forCode:int main (int argc, char *argv[])
and it will return false. but can i test forCode:if (argv[argc])
and know that it will safely return false? i don't think so, but i'm not sure...Code:if (argv[argc + 1])
hello, internet!
argv[argc] is guaranteed to be NULL, argv[argc + 1] exceeds the array boundaries for argv. So your test would result in undefined behavior.
-Prelude
My best code is written with the delete key.