I am learning C++. I need to print the environment value of a particular environment variable. I am finding examples to check whether a environment variable is defined or not. But how to print the environment value.
GetEnvironmentVariable(_T("path"), Buffer, _MAX_PATH);
returns DWORD
and it is printing some integer but I need to print the exact value something like "C:\programfiles\windows".
In C# I can do this using
string abc = Environment.GetEnvironmentVariable("PATH");
cout<<a;
How to do this in VC++. Thanks