Friday, February 26, 2010

Pegando uma variavel de ambiente em C

#include
#include

int main(void) {
char *myenvvar=getenv("EDITOR");
printf("The editor environment variable is set to %s\n",myenvvar);
}

output

emacs -nw

No comments:

Blog Archive