// 取得本地以太网卡的地址 string mac_addr; for (int i = 0; i < AdapterList.length - 1; ++i) { if (GetAdapterInfo(AdapterList.lana[i], mac_addr)) { cout << "Adapter " << int (AdapterList.lana[i]) << "'s MAC is " << mac_addr << endl; } else { cerr << "Failed to get MAC address! Do you" << endl; cerr << "have the NetBIOS protocol installed?" << endl; break; } }