C++ examples for Data Type:struct
Assigning data values to a structure's members
// A program that defines and populates a structure #include <iostream> using namespace std; int main()/*from w ww . j a v a 2s . co m*/ { struct { int month; int day; int year; } birth; birth.month = 12; birth.day = 28; birth.year = 1986; cout << birth.month << '/' << birth.day << '/' << birth.year << endl; return 0; }