Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <tr1/memory>
- int main()
- {
- #ifdef USE_SHARED_PTR
- std::tr1::shared_ptr<volatile int> i(new int(1));
- #else
- volatile int * i = new int(1);
- #endif
- long long int h = 0;
- for(long long int j=0;j < 10000000000LL; j++)
- {
- h += *i;
- }
- std::cout << h << std::endl;
- return 0;
- }
Add Comment
Please, Sign In to add comment