字符数组16进制输出方法

函数实现:

static void LOGHEX(const char *pszPrompt,  uchar *psParaInfo, int iParaLen)
{
	int i;
	LOG("%s", pszPrompt);
	for(i = 0; i < iParaLen; i++ )
	{
		LOG("0x%02x ", psParaInfo[i]);

	}

	//LOG("psParaInfo=%s ", psParaInfo);
}

具体实例:
LOGHEX(“TMK KcvValue=”,KcvValue,sizeof(KcvValue));

输出结果:
在这里插入图片描述

猜你喜欢

转载自blog.csdn.net/ZoeyZY/article/details/83062270
今日推荐