Mail Archives: djgpp/1997/10/16/05:17:38
John M. Aldrich wrote:
[...]
> However, I must say again that you should NOT overwrite string constants
> without a good reason; it's terrible programming. Unless this is the
> exact intent of whatever project you are working on, there must be a
> better way to do what you want. If you describe your goals, maybe we
> can suggest something.
>
Hmm, maybe I don't get the point here, but I frequently do things like
char inifile[256]="foo.bar";
and in a parse routine with getopt
switch( c=getopt(argc, argv, "n:")){
case 'n': strcpy(inifile, optarg);
break;
...
Is this one of the rare occasions where char[] and *char are
quite different things?
--
Ciao
Tom
*************************************************************
* Thomas Demmer *
* Lehrstuhl fuer Stroemungsmechanik *
* Ruhr-Uni-Bochum *
* Universitaetsstr. 150 *
* D-44780 Bochum *
* Tel: +49 234 700 6434 *
* Fax: +49 234 709 4162 *
* http://www.lstm.ruhr-uni-bochum.de/~demmer *
*************************************************************
- Raw text -