嵌入式驱动面试题:宏定义判断大小,不能使用大于、小于、if语句
// test.cpp : Defines the entry point for the console application.//#include "stdafx.h"#include "stdio.h"#include "extern.h"#include "malloc.h"#define Z(a) ((unsigned)a>>31==0)#define F(a) ((unsigned)a>>31==1)#define COMP(a,b) (!(a-b)
原创
2020-07-07 16:30:00 ·
1055 阅读 ·
0 评论