Skip to content

Instantly share code, notes, and snippets.

@vigack
Created August 1, 2017 01:34
Show Gist options
  • Save vigack/0f7cb9f5c30dcf75abb2b5ca9d341187 to your computer and use it in GitHub Desktop.
Save vigack/0f7cb9f5c30dcf75abb2b5ca9d341187 to your computer and use it in GitHub Desktop.
判断两个int类型数符号是否相反
int x, y;
bool f = ((x^y)<0); // true表示两数符号相反
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment