Skip to content

Latest commit

 

History

History
56 lines (52 loc) · 1000 Bytes

compiler-error-c2638.md

File metadata and controls

56 lines (52 loc) · 1000 Bytes
title Compiler Error C2638 | Microsoft Docs
ms.custom
ms.date 11/04/2016
ms.reviewer
ms.suite
ms.technology
cpp-tools
ms.tgt_pltfrm
ms.topic error-reference
f1_keywords
C2638
dev_langs
C++
helpviewer_keywords
C2638
ms.assetid 9d4275e8-406d-455e-afee-3a37799230e0
caps.latest.revision 8
author corob-msft
ms.author corob
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

Compiler Error C2638

'identifier' : __based modifier illegal on pointer to member

The __based modifier cannot be used for pointers to members.

The following sample generates C2638:

// C2638.cpp  
void *a;  
  
class C {  
public:  
   int i;  
   int j;  
   int func();  
};  
int __based (a) C::* cpi = &C::i;  // C2638  
int (__based (a) C::* cpf)() = &C::func; // c2638