zoukankan      html  css  js  c++  java
  • 读取一个字节的8位 并输出

                                unsigned char  leibie=pLasfPoint->classification;
    
                                index++;
                                if(index%100000==0)
                                {
                                   TCHAR dd[20];
                                 //  _stprintf(dd,_T("第%d个
    "),index);
                                   _stprintf(dd,_T("x:%f  y:%f  z:%f
    "),pt.x,pt.y,pt.z);
                                  
                                    OutputDebugString(dd);
                                }
    
                                int temp;
                                int aa[8];
                                for(int i=0;i<8;i++)
                                {
                                    /*temp=(leibie>>i)&1;
                                    if(i==7&& temp==1)
                                    {
                                    TCHAR sz[20];
                                   _stprintf(sz,_T("第%d位 :%d
    "),i,temp);
                                    OutputDebugString(sz);
                                    }*/
                                    temp=(leibie>>i)&1;
                                    aa[i]=temp;
    
                                }
                                
                                char  Leib[20];
                                 sprintf(Leib, "%d%d%d%d%d%d%d%d",aa[0],aa[1],aa[2],aa[3],aa[4],aa[5],aa[6],aa[7]);
                                 string strlei;
                                 strlei=Leib;
    
                                 vector<string>::iterator iter= find(VpointLeibei.begin(),VpointLeibei.end(),strlei);
                                 if(iter==VpointLeibei.end())
                                 {
                                     VpointLeibei.push_back(strlei);
                                     OutputDebugString(CHelper::ANSIToUnicode(strlei));
                                     OutputDebugString(_T("
    "));
                                 }
  • 相关阅读:
    zipfile和tarfile的简单使用方法
    RabbitMQ安装
    postman接口自动化
    linux命令
    redis安装部署和使用
    nmon使用
    jdk自带监控工具配置使用
    修改本机mac
    hashlib模块,md5加密
    tomcat部署
  • 原文地址:https://www.cnblogs.com/marky/p/3737099.html
Copyright © 2011-2022 走看看