いろいろなテクニック.Nucleo と DISCO-F746 用.
Dependencies: Array_Matrix mbed
Diff: MyVector.hpp
- Revision:
- 0:bb939e0bc6e2
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/MyVector.hpp Sun Oct 15 11:41:48 2017 +0000 @@ -0,0 +1,17 @@ +#include <vector> + +void MyVector() +{ + vector<int> v; + printf("\r\nSize of v: %d\r\n", v.size()); + + v.push_back(10); + v.push_back(11); + v.push_back(12); + + printf("\r\nSize of v: %d\r\n", v.size()); + vector<int>::const_iterator p1; + for (p1 = v.begin(); p1 != v.end(); p1++) + printf("%d ", *p1); + printf("\r\n"); +}