codepad
[
create a new paste
]
login
|
about
Language:
C
C++
D
Haskell
Lua
OCaml
PHP
Perl
Plain Text
Python
Ruby
Scheme
Tcl
class Foo { public: Foo(){ cout << "Foo::Foo" << endl; } ~Foo(){ cout << "Foo::~Foo" << endl; } }; int main() { { std::vector<Foo> fooList; fooList.reserve(100); cout << "--- 1 ---" << endl; fooList.push_back(Foo()); cout << "--- 2 ---" << endl; fooList.push_back(Foo()); cout << "--- 3 ---" << endl; fooList.push_back(Foo()); cout << "--- 4 ---" << endl; fooList.push_back(Foo()); cout << "--- 5 ---" << endl; fooList.push_back(Foo()); cout << "--- 6 ---" << endl; fooList.push_back(Foo()); cout << "--- 7 ---" << endl; fooList.push_back(Foo()); cout << "--- 8 ---" << endl; } }
Private
[
?
]
Run code
Submit