Tuesday 12 February 2013

What is Typedef in C++ programming ?


What is Typedef in C++ programming ?

Typedef is a keyword. This is used to define a new name for an existing data type. The general form is

typedef datatype newname;

where,
typedef -keyword
datatype - valid datatypes such as int, float, char, etc.
new name - valid C++ name for the data type

In C++ there is no need to specify the keyword typedef for enum, structure and union data types.

0 comments:

Post a Comment

Powered by Blogger.