///////////////////////////////////
// envspitter.cpp
//
// A C/C++ program to spit the environmental variables
//
// g++ -oenvspitter.exe envspitter.cpp
//
#include <stdio.h>
int main( int argc , char **argv , char **envp )
{
char **temp = envp;
while (*(temp+1) != 0 ) {
puts(*temp);
temp++;
}
return 0;
}
Saturday, February 27, 2010
C/C++ Programming under Linux - Part 3
The following program will spit the environment variables inherited when invoked.
Labels:
GNU Linux Programming
| Reactions: |
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment