thello_user.A.cpp - numeric - C++ library with numerical algorithms
 (HTM) git clone git://src.adamsgaard.dk/numeric
 (DIR) Log
 (DIR) Files
 (DIR) Refs
 (DIR) LICENSE
       ---
       thello_user.A.cpp (321B)
       ---
            1 #include <iostream>
            2 #include <string>
            3 #include <cstdlib> // For getenv()
            4 
            5 int main()
            6 {
            7   // Namespace definitions
            8   using std::cout;
            9   using std::string;
           10 
           11   // Get USER environment variable
           12   string username = getenv("USER");
           13 
           14   // Greet user
           15   cout << "Hello, " << username << '\n';
           16 
           17   // Successfull exit
           18   return 0;
           19 }