C++字符比较

typedef char SWDirectionDataType;
/// 买
#define SWDirection_D_BuyEnumType '0'
/// 卖
#define SWDirection_D_SellEnumType '1'
void main()
{
 SWDirectionDataType direction = '1';
 if (direction == SWDirection_D_BuyEnumType)
 {
  cout << "buy" << endl;
 }
 else
 {
  cout << "sell" << endl;
 }

 int wait;
 cin >> wait;
}

 

posted @ 2013-06-22 19:25  Predator  阅读(345)  评论(0编辑  收藏  举报