Answers to Quiz 1

  1. 程式是錯的.解法有兩種.
    1. pRect->top += 10;
      std::cout << pRect->top;
    2. (*pRect).top += 10;
      std::cout << (*pRect).top;
  2. 程式是錯的.struct宣告結尾要加上分號.
    struct ListElement
    {
    int value;
    ListElement* pNext;
    };
  3. 1
    2
    3