12345678910111213141516171819202122232425262728293031323334353637383940414243444546 |
- #if(0)
- #include <iostream>
- int& test01()
- {
- int a = 10;
- return a;
- }
- int& test02()
- {
- static int a = 10;
- return a;
- }
- int main()
- {
-
-
-
- int& ref2 = test02();
- std::cout << " ref2 = " << ref2 << std::endl;
-
- test02() = 1000;
- system("pause");
- return 0;
- }
- #endif
|