My resignation letter is in ANSI C++
adamwynne.wordpress.com
My resignation letter is in ANSI C++
1–7 of 7 posts
Re: My resignation letter is in ANSI C++
#2Re: My resignation letter is in ANSI C++
#3Is argc really a const in C++'s main? I can't imagine why it would be, given that argv++; argc--; is a very standard idiom in command-line argument processing.
Re: My resignation letter is in ANSI C++
#4Is argc really a const in C++'s main? I can't imagine why it would be, given that argv++; argc--; is a very standard idiom in command-line argument processing.
Seeing I wasn't using it, I thought I might hint to the optimiser that it could optimise it away. But now that you mention it, the argv should have been const char * const
In fact, if you compile that code with warnings turned on, you'll get a "variable is not used" warning -- which most style guides say should be silenced by adding the following line to the start of your function:
(void)argc; /* UNUSED */Re: My resignation letter is in ANSI C++
#5 #include
int main (int argc, char **argv) {
puts("Screw you guys! I'm going home.");
}
I'm thinking they were glad to see you go because you took an hour to do 60 seconds worth of work.Re: My resignation letter is in ANSI C++
#6Re: My resignation letter is in ANSI C++
#7#include int main (int argc, char **argv) { puts("Screw you guys! I'm going home."); } I'm thinking they were glad to see you go because you took an hour to do 60 seconds worth of work.