sprintf(buf,"select * from 学生总表 where 系别 like \'%s%s%s\'","%",str.GetBuffer(str.GetLength()),"%");
//sprintf(buf,"select * from 学生总表 where 年级 like \'*%s*\'",str.GetBuffer(str.GetLength()));
为什么下面一个是不正确的阿,那个%怎么用在那边,有点想不通!
还有:ttemp.Format(" %02X",(BYTE)str[i]);02x是什么意思!
谢谢了!
//sprintf(buf,"select * from 学生总表 where 年级 like \'*%s*\'",str.GetBuffer(str.GetLength()));
为什么下面一个是不正确的阿,那个%怎么用在那边,有点想不通!
还有:ttemp.Format(" %02X",(BYTE)str[i]);02x是什么意思!
谢谢了!
02x表示显示两位,不足前面补零
例如 上面如果i=1,则ttemp=01
如果i=12,则ttemp=12
tmp = "\n";
ddd = tmp.Format( "%02X", tmp );则ddd = 0x0A;