Last active
February 28, 2017 01:17
-
-
Save pezy/cdaf8fc1437677da5936ddba4542a1a2 to your computer and use it in GitHub Desktop.
misuse of std::vector
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 <vector> | |
#include <iostream> | |
int main() | |
{ | |
std::vector<int*> vec(10, new int); | |
for (auto p : vec) | |
std::cout << static_cast<void*>(p) << std::endl; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment