This commit is contained in:
2023-12-23 22:23:48 +08:00
commit 43ced8bd2a
58 changed files with 5702 additions and 0 deletions

13
ACMOJ-1048.cpp Normal file
View File

@ -0,0 +1,13 @@
#include "ACMOJ-1048.hpp"
#include<iostream>
void hello() { std::cout << "Hello world!" << std::endl; }
int main() {
int *p = new int[2];
Defer defer([&]() { delete[] p; });
defer([&]() { std::cout << p[0] << " " << p[1] << std::endl; });
defer([&]() { p[0] = 0, p[1] = 1; });
defer(hello);
p[0] = 2, p[1] = 3;
return 0;
}