[EMAIL PROTECTED] wrote:
>> ! char *input_str;
>> ! strcpy(input_str, (optind < ac ? av[optind] : ""));
>> ! cgi input(input_str);
>>
>
> I'd say
>
> String input_str(optind < ac ? av[optind] : "");
> cgi input(input_str);
No can do. This discards the const as well. We don't have a const char *
constructor, and even if we did, we'd have to do a copy somewhere. (I'm
not so sure I want to add a String(const char*) just for this purpose
either.
I agree with the standard--you don't want to to let people mess around
with const variables. But you have to be able to discard it somehow! It
seems the only safe way is to use strcpy or equivalent.
--
-Geoff Hutchison
Williams Students Online
http://wso.williams.edu/
------------------------------------
To unsubscribe from the htdig3-dev mailing list, send a message to
[EMAIL PROTECTED] containing the single word "unsubscribe" in
the SUBJECT of the message.