The following code example demonstrates the retrieval of the current user name (the name of the user logged into Windows). The name is stored in the
Example
| В | Copy Code |
|---|---|
// username.cpp
// compile with: /clr
using namespace System;
int main()
{
Console::WriteLine("\nCurrent user: {0}", Environment::UserName);
return 0;
} | |
Dhtml editor
Free javascript download