I'm afraid I attached the demo to this PR after amending it, and am unable to correct it. Line 9 should be changed from args[1] = (flags==0) ? (char *)"-n" : (char *)"-p"; to args[1] = (flags==0) ? "-n" : "-p"; My apologies! -- Regards, Richard Smith