12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152 |
- const int* wusi(int i) {
- return &i;
- }
- const int wusi2(int i) {
- return i;
- }
- struct B {
- int b;
- };
- struct A {
- int a;
- B b;
- };
- void wusi(const A* a) {
-
-
- test(a->a);
- test(a->b.b);
- }
- void main() {
- const int i = 3;
- const int* w = &i;
- int a = i;
- a = i;
- const int* b = nullptr;
- const int** c = &b;
- const int* d = *c;
- b = wusi(3);
- a = wusi2(3);
-
- int* test = new int[5];
- delete test;
-
-
-
- int* e = nullptr;
-
- test(i + 1);
-
- test(e == d);
- test(e != d);
-
- A s;
- s.a = 3;
- s.b.b = 5;
- wusi(&s);
- }
|