![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
Template project for University of York ELE00032C Lab 4
main.cpp@2:811646ac034f, 2021-02-04 (annotated)
- Committer:
- ajp109
- Date:
- Thu Feb 04 10:22:31 2021 +0000
- Revision:
- 2:811646ac034f
- Parent:
- 1:8290f84652d1
Initial commit (lab4-1)
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
ajp109 | 0:77209603a6fe | 1 | #include "mbed.h" |
ajp109 | 0:77209603a6fe | 2 | |
ajp109 | 1:8290f84652d1 | 3 | struct IntVector { |
ajp109 | 2:811646ac034f | 4 | int x; |
ajp109 | 2:811646ac034f | 5 | int y; |
ajp109 | 1:8290f84652d1 | 6 | }; |
ajp109 | 1:8290f84652d1 | 7 | |
ajp109 | 1:8290f84652d1 | 8 | int main() { |
ajp109 | 2:811646ac034f | 9 | IntVector p; |
ajp109 | 2:811646ac034f | 10 | |
ajp109 | 2:811646ac034f | 11 | p.x = -3; |
ajp109 | 2:811646ac034f | 12 | p.y = 1; |
ajp109 | 2:811646ac034f | 13 | |
ajp109 | 2:811646ac034f | 14 | printf("(%d, %d)\r\n", p.x, p.y); |
ajp109 | 2:811646ac034f | 15 | |
ajp109 | 2:811646ac034f | 16 | // Do nothing, forever... |
ajp109 | 2:811646ac034f | 17 | while (true); |
ajp109 | 0:77209603a6fe | 18 | } |