DOC: Error C2213 Occurs When Base Is an Expression (67882)
The information in this article applies to:
- Microsoft C for MS-DOS 6.0
- Microsoft C for MS-DOS 6.0a
- Microsoft C for MS-DOS 6.0ax
- Microsoft C/C++ for MS-DOS 7.0
- Microsoft Visual C++ 1.0
- Microsoft Visual C++ 1.5
- Microsoft Visual C++, 32-bit Professional Edition 2.0
This article was previously published under Q67882 SUMMARY
The following keywords were first introduced with Microsoft C version
6.0:
Variables of type _segment are defined to hold a memory segment address.
With based variables, a base must be named to specify where the data
resides. The base can be of type _segment, or can be a near or a far
pointer. However, if the base is an expression, even of one of the types
listed above, the following error is produced:
error C2213: illegal argument to _based
NOTE: In Microsoft Visual C++ 32-bit Edition, version 2.0, the _segment
keyword was removed and the functionality of the __based keyword changed.
In 32-bit compilations, pointers based on pointer addresses are the only
forms of __based valid. In such compilations, these pointers are 32-bit
displacements from a 32-bit base. For more information, search for "based
addressing" in the online documentation included with Visual C++ 32-bit
Edition.
Modification Type: | Minor | Last Reviewed: | 7/5/2005 |
---|
Keywords: | kbCompiler kbdocfix KB67882 |
---|
|