Free Web Hosting Provider - Web Hosting - E-commerce - High Speed Internet - Free Web Page
Search the Web


#include "mac.h"

// ==========================
int main ()
{
vector<vector<string> > mac_address (get_mac_via_popen());

  if (mac_address.empty())
  {
    cout << "Unable to get MAC address" << endl;
    return 1;
  }

  cout << endl;
  cout << "\t=== MAC address(es) ===" << endl;
  for (unsigned int i = 0; i < mac_address.size(); i++)
  {
    for (unsigned int j = 0; j < mac_address[i].size(); j++)
    {
      cout << mac_address[i][j] << "  ";
    }
    cout << endl;
  }

  return 0;
}