Created
December 30, 2017 08:05
-
-
Save FONQRI/0a25b964b6d60cd32820f0dc158d0023 to your computer and use it in GitHub Desktop.
this is a simple vector code
This file contains hidden or 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 <memory> | |
#include <vector> | |
class Test { | |
public: | |
Test() { std::clog << "created" << std::endl; } | |
~Test() { std::clog << "destroid " << std::endl; } | |
int value = 56; | |
}; | |
int main() | |
{ | |
std::clog << "simple : " << std::endl; | |
std::vector<Test> smpleVector; | |
Test st1; | |
smpleVector.push_back(st1); | |
Test st2; | |
smpleVector.push_back(st2); | |
Test st3; | |
smpleVector.push_back(st3); | |
Test st4; | |
smpleVector.push_back(st4); | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment