如何将MAC地址用__int64表示
如题,有没有比较简洁的写法,类似这样的
- C/C++ code
__int64 nMacID;string strMAC = "00004030E010A2";sscanf(strTest,"%d",&nMacID);
[解决办法]
我觉得如果你想用int64位存储MAC地址的话,就直接存储MAC的那个16进制的值咯。然后自己从int64中解析出来。比如:MAC(00-23-5A-15-99-42)int64的布局:0x 00235A159942 然后自己从int64中解析
[解决办法]
[解决办法]
sscanf(strTest,"%I64x",&nMacID);