Last active
November 9, 2019 12:50
-
-
Save Ben1980/d10fe2196b8d1aa08d0793c96defb64c to your computer and use it in GitHub Desktop.
This file contains 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
#include <iostream> | |
#include <vector> | |
void print(const std::vector<int> &vec) { | |
std::cout << "sizeof(int): " << sizeof(int) << ' '; | |
for(const auto & e : vec) { | |
std::cout << &(e) << ", "; | |
} | |
std::cout << std::endl; | |
} | |
int main() { | |
std::vector<int> vec = { 0,1,2,3,4,5,6,7,8,9,10 }; | |
print(vec); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment