Cooler_

trick integer 2 match string

Nov 25th, 2014
222
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.31 KB | None | 0 0
  1. // my trick is not good idea ;-(
  2. uint64_t x=*(uint64_t *)"action =";
  3.  char *var="action =gijoe comando teste";
  4.  uint64_t z=*(uint64_t *)var;
  5.  
  6.  if(x==z)
  7.         puts("OK");
  8.  else
  9.         puts("Nops");
  10. // what this it ?
  11. http://en.wikipedia.org/wiki/Magic_number_%28programming%29#Unnamed_numerical_constants
Advertisement
Add Comment
Please, Sign In to add comment