Skip to content

Instantly share code, notes, and snippets.

@pezy
Last active February 28, 2017 01:17
Show Gist options
  • Save pezy/cdaf8fc1437677da5936ddba4542a1a2 to your computer and use it in GitHub Desktop.
Save pezy/cdaf8fc1437677da5936ddba4542a1a2 to your computer and use it in GitHub Desktop.
misuse of std::vector
#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