Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // This is super good, everything works as expected
- #include <iostream>
- #include <string>
- void Close()
- {
- // Code I need to run when program closes.
- }
- int main()
- {
- std::atexit(Close);
- // Some code...
- return 0;
- }
- #include <iostream>
- #include <string>
- void Close()
- {
- // Code I need to run when program closes.
- }
- int main()
- {
- std::atexit(Close);
- std::string example;
- std::cin >> example;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement