do while 宏定义如何使用?

#define verification(lhs,rhs,str) do { \
		if (lhs == rhs) { \
			std::cout << rang::style::bold << rang::fg::green << "[Success]" << rang::style::reset << " " << str << std::endl; \
		}else {	\
			std::cout << rang::style::bold << rang::fg::red << "[Fail]" << rang::style::reset << "    " << str << std::endl; \
		} \
	} while (0)
posted @ 2018-07-19 17:32  學海無涯  阅读(280)  评论(0编辑  收藏  举报