code_junkie

Ensuring a Program Written for 32-bit Windows is Compatible with 64-bit Windows

Nov 13th, 2011
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.24 KB | None | 0 0
  1. struct GPoint
  2. {
  3. int x;
  4. int y;
  5. }
  6.  
  7. // Array of twenty GPoints
  8. GPoint[] myArr = malloc(20 * sizeof(GPoint);
  9.  
  10. GPoint* myPointer = myArr;
  11. int index = GetIndexAffectedPoint();
  12.  
  13. // Invert X and Y for the point
  14. myPointer += 8*index;
  15. swap(myPointer);
Add Comment
Please, Sign In to add comment