Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84; site brl-tgr.ARPA Path: utzoo!watmath!clyde!burl!ulysses!allegra!mit-eddie!think!harvard!seismo!brl-tgr!gwyn From: gwyn@brl-tgr.ARPA (Doug Gwyn ) Newsgroups: net.lang.c Subject: Re: Pointer Trouble Right Here in Unix City Message-ID: <11102@brl-tgr.ARPA> Date: Tue, 28-May-85 16:49:08 EDT Article-I.D.: brl-tgr.11102 Posted: Tue May 28 16:49:08 1985 Date-Received: Thu, 30-May-85 02:39:03 EDT References: <179@gatech.CSNET> Distribution: net Organization: Ballistic Research Lab Lines: 15 > *(*argv + 2) ? *argv += 2 : argv++; cond ? expr1 : expr2 If expr1 and expr2 are both pointers, they must have the same type. (Section C.3.15 of ANSI X3J11/85-008) You could write *(*argv + 2) ? (*argv += 2) : *(argv++); but this is hardly the most readable code in any case. P.S. Consider using the public-domain getopt() that I posted a while back. (You can easily disable the checks that preclude -xargument style options in favor of -x argument. I think those restrictions in the spec are pretty silly anyway.)