使用wxWidgets進行跨平台程式開發-zetcode_wxWidgets_helper_classes08(改寫)
使用wxWidgets進行跨平台程式開發-zetcode_wxWidgets_helper_classes08(改寫)
zetcode_wxWidgets_helper_classes08(console application、wxPuts命令模式文字輸出-有換行、抓取程式所在的系統參數 the home user directory, os name, user name, host name, and total free memory)
#include <wx/string.h>
#include <wx/utils.h>
/*
http://zetcode.com/gui/wxwidgets/helperclasses/
Next we will we will get the home user directory, os name, user name, host name, and total free memory.
*/
int main(int argc, char **argv)
{
wxPuts(wxGetHomeDir());
wxPuts(wxGetOsDescription());
wxPuts(wxGetUserName());
wxPuts(wxGetFullHostName());
long mem = wxGetFreeMemory().ToLong();
wxPrintf(wxT("Memory: %ld\n"), mem);
}