Advertisement
DraKiNs

[COD] Acessar Array sem erro

Aug 19th, 2011
386
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 0.25 KB | None | 0 0
  1. #define acessar(%0,%1)      %0[((%1) > (-1)) && ((%1) < (sizeof %0)) ? %1 : sizeof %0 - 1]
  2.  
  3.  
  4. new gArrayTeste[500];
  5. printf("%d ", acessar(gArrayTeste,999)); //not Array index out of bounds
  6.  
  7. // Criado por Bruno da Silva
  8. // www.ips-team.blogspot.com
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement