tyour_username.B.cpp - numeric - C++ library with numerical algorithms
 (HTM) git clone git://src.adamsgaard.dk/numeric
 (DIR) Log
 (DIR) Files
 (DIR) Refs
 (DIR) LICENSE
       ---
       tyour_username.B.cpp (241B)
       ---
            1 #include <iostream>
            2 #include <string>
            3 #include <cstdlib> // For getenv()
            4 
            5 void your_username()
            6 {
            7 
            8   // Get USER environment variable
            9   std::string username = getenv("USER");
           10 
           11   // Print username to stdout
           12   std::cout << username << '\n';
           13 
           14 }