Created
April 10, 2019 13:02
-
-
Save Warwolt/ccb0b3c5a581f2ab70058b1251cc9d55 to your computer and use it in GitHub Desktop.
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
struct Point | |
{ | |
int x; | |
int y; | |
}; | |
translate_point_diagonally(Point *p, int amount) | |
{ | |
p->x += amount; | |
p->y += amount; | |
} | |
void main(void) | |
{ | |
Point my_point = {1, 2}; | |
translate_point_diagonally(&my_point, 5); // my_point = {6, 7} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment