![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
いろいろなテクニック.Nucleo と DISCO-F746 用.
Dependencies: Array_Matrix mbed
MyVector.hpp@1:bbb9f0c3e523, 2019-04-10 (annotated)
- Committer:
- MikamiUitOpen
- Date:
- Wed Apr 10 06:32:33 2019 +0000
- Revision:
- 1:bbb9f0c3e523
- Parent:
- 0:bb939e0bc6e2
2
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
MikamiUitOpen | 0:bb939e0bc6e2 | 1 | #include <vector> |
MikamiUitOpen | 0:bb939e0bc6e2 | 2 | |
MikamiUitOpen | 0:bb939e0bc6e2 | 3 | void MyVector() |
MikamiUitOpen | 0:bb939e0bc6e2 | 4 | { |
MikamiUitOpen | 0:bb939e0bc6e2 | 5 | vector<int> v; |
MikamiUitOpen | 0:bb939e0bc6e2 | 6 | printf("\r\nSize of v: %d\r\n", v.size()); |
MikamiUitOpen | 0:bb939e0bc6e2 | 7 | |
MikamiUitOpen | 0:bb939e0bc6e2 | 8 | v.push_back(10); |
MikamiUitOpen | 0:bb939e0bc6e2 | 9 | v.push_back(11); |
MikamiUitOpen | 0:bb939e0bc6e2 | 10 | v.push_back(12); |
MikamiUitOpen | 0:bb939e0bc6e2 | 11 | |
MikamiUitOpen | 0:bb939e0bc6e2 | 12 | printf("\r\nSize of v: %d\r\n", v.size()); |
MikamiUitOpen | 0:bb939e0bc6e2 | 13 | vector<int>::const_iterator p1; |
MikamiUitOpen | 0:bb939e0bc6e2 | 14 | for (p1 = v.begin(); p1 != v.end(); p1++) |
MikamiUitOpen | 0:bb939e0bc6e2 | 15 | printf("%d ", *p1); |
MikamiUitOpen | 0:bb939e0bc6e2 | 16 | printf("\r\n"); |
MikamiUitOpen | 0:bb939e0bc6e2 | 17 | } |