Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Type declaration 1

Status
Not open for further replies.

cnjihia

Technical User
Feb 18, 2003
4
0
0
KE
Hi,
How would you declare a new data type withou having to create a class for it.For example a new data type Tdata of type array[1..4] of string?
Thanks.
 
For your specific case:

typedef string Tdata[ 4 ];


The syntax looks a little weird when you do it with arrays. The example:

typedef vector<string> StrVec;


Probably make sa little more sense the first time you look at it.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top