Share via


Type NamesĀ 

Type names are used in some declarators in the following ways:

  • In explicit conversions

  • As arguments to the sizeof operator

  • As arguments to the new operator

  • In function prototypes

  • In typedef statements

A type name consists of type specifiers such as int or the name of a class or struct, in combination with an abstract declarator, as described in Declarations and Abstract Declarators. The abstract declarator has the effect of modifying the base type to produce a pointer, reference or array type. It is not required if specifying a scalar type.

In the following example, the arguments to the function strcpy are supplied using their type names. In the case of the source argument, const char is the type specifier and * is the abstract declarator:

static char *szBuf, *strcpy( char *dest, const char *source );

See Also

Reference

Declarators