struct Student
{ string name;
int height; // height in inches
double weight; // weight in pounds
string dob; // date of birth mm/dd/yy
}
Student pat;
pat.name = "Patricia Patrick";
pat.height = 68;
pat.weight = 132.5;
cout << pat.name << " is " << pat.height
<< " inches tall." << endl;
- tvector<type> name;
- tvector<type> name(expression);
- tvector<type> name(expression, value);
where type is any type or class with default (parameterless) tvector<int> nums(4, -1);
tvector<string> words(12, "Hi");
for(k = 0; k < 4; k++)
nums[k] = -1;
for(k = 0; k < 12; k++)
words[k] = "Hi";