C++ examples for Data Type:struct
Create global struct
#include <iostream> using namespace std; struct Date // this is a global declaration { int month;//from ww w . j ava2s .c o m int day; int year; }; int main() { Date birth; birth.month = 12; birth.day = 28; birth.year = 1986; cout << birth.month << '/' << birth.day << '/' << birth.year << endl; return 0; }