Re: Reg seg. violations

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Bill McEnaney writes:
 > Maybe another problem is that getenv() expects a pointer, not a string
 > literal.  It seems to me although a pointer can point to a string
 > literal, a string literal can't point to anything.  If I'm mistaken,
 > would someone please say so?

You're mistaken.

getenv() expects a const char*, and a string literal has a type
char[], which is compatible.

Andrew.


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux