--- title: "pointer_default | Microsoft Docs" ms.custom: "" ms.date: "11/04/2016" ms.reviewer: "" ms.suite: "" ms.technology: - "cpp-windows" ms.tgt_pltfrm: "" ms.topic: "language-reference" f1_keywords: - "vc-attr.pointer_default" dev_langs: - "C++" helpviewer_keywords: - "pointer_default attribute" ms.assetid: 2d0c7bbc-a1e8-4337-9e54-e304523e2735 caps.latest.revision: 9 author: "mikeblome" ms.author: "mblome" manager: "ghogen" translation.priority.ht: - "cs-cz" - "de-de" - "es-es" - "fr-fr" - "it-it" - "ja-jp" - "ko-kr" - "pl-pl" - "pt-br" - "ru-ru" - "tr-tr" - "zh-cn" - "zh-tw" --- # pointer_default Specifies the default pointer attribute for all pointers, except top-level pointers that appear in parameter lists. ## Syntax ``` [ pointer_default( value ) ] ``` #### Parameters *value* A value that describes the pointer type: **ptr**, `ref`, or **unique**. ## Remarks The **pointer_default** C++ attribute has the same functionality as the [pointer_default](http://msdn.microsoft.com/library/windows/desktop/aa367141) MIDL attribute. ## Example See the example for [defaultvalue](../windows/defaultvalue.md) for a sample use of **pointer_default**. ## Requirements ### Attribute Context ||| |-|-| |**Applies to**|`interface`| |**Repeatable**|No| |**Required attributes**|None| |**Invalid attributes**|None| For more information about the attribute contexts, see [Attribute Contexts](../windows/attribute-contexts.md). ## See Also [IDL Attributes](../windows/idl-attributes.md) [Interface Attributes](../windows/interface-attributes.md)