變更函數傳回的內容

當函數傳回 «existing type» 時,則是由類型指標傳回的。您可以設定由 "value"()"pointer"(*)"reference"(&) 返回函數。

程序

  1. 用滑鼠右鍵按一下函數/作業,並選取特性,以開啟「特性」視窗。
  2. 內容標籤上,尋找 CPP_CG::Type::ReturnType 內容。
  3. 將值變更為下列其中任一個選項:
    • $Type* 以由 "pointer"(*) 傳回
    • $Type 以由 "value"() 傳回
    • $Type& 以由 "reference"(&) 傳回
  4. 按一下確定

回饋