-1
誰かが内部ループポインタを評価する方法を教えてください。*++argv[0]
ポインタの配列評価
どのようにして2番目の文字が引数から得られますか?
#include <stdio.h>
#include <string.h>
int main(int argc, char *argv[])
{
while (--argc > 0 && (*++argv)[0] == '-') {
while ((c = *++argv[0])) {
switch (c) {
....
}
...
}
}
}
あなたが理解していないコードを書かねばならない魅力的な理由がありますか?ちょうど、それは決して必要ではありません。 –
この種のコードの最善の解決策は、POSIX ['getopt()'](http://pubs.opengroup.org/onlinepubs/9699919799/functions/getopt.html) またはGNUの '' getopt_long() '](https://www.gnu.org/software/libc/manual/html_node/Getopt-Long-Options.html#Getopt-Long-Options)関数を使用します。 –
@HansPassantはいはい。多分別の時。 =) – dud3