Created
October 29, 2011 00:27
-
-
Save qpfiffer/1323913 to your computer and use it in GitHub Desktop.
reverse
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| void quack::reverse(void) | |
| { | |
| int i, j, temp=0; | |
| for (i=(frontInt), j=0; j<((numItems/2)+1); | |
| i = (i+1) % mySize, j++) { | |
| temp = items[i].n; | |
| items[i].n = items[(backInt-j)%mySize].n; | |
| items[(backInt-j)%mySize].n = temp; | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment