Hi all
Thanks for all the replies to this question. I have a follow up question.
I agree
char *audithome = getenv("AUDITHOME");
works.
My question is if i define
char audithome[MAX_PATH_NAME];
and pass it as an argument to any function for example
strcpy (char *, ------
strcpy(audithome,
it works. Here the argument is a pointer to char type???
where as it does not work when the function returns a char * type?
for example char *getenv(-------
audithome = getenv("AUDITHOME")
(Ninan Thomas) wrote in message news:<. com>...
> #define MAX_PATH_NAME 100
>
>
> char audithome[MAX_PATH_NAME];
>
> audithome = getenv("AUDITHOME");
>
>
>
> this fails to compile giving an error
> "incompatible types in assignment"
>
> I am using gcc compiler on Solaris
>
> REgards
>
> Ninan