/** Copyright and version statement of the program: * Copyright (c) 2012, Emy of computer science, Yantai University * All rights reserved. * file name :. cpp * Author: Mao Tong * Completion Date: July 15, January 22, 2013 * version number: v1.0 * description of the task and solution section: * input description: no */[cpp]/* defines two struct variables: student1 and student2. The members include the student ID, name, gender, birth date, and score. student2 is initialized, then, the value of student2 is assigned to student1. Output student1 members */# include <iostream> using namespace std; struct Date // declare struct type Date {int month; int day; int year ;}; struct Student {int num; char name [20]; char sex; Date birthday; // declare that birthday is a member of the Date type float score;} student1, student2 = {10002, "wangli", 'F', 1992, 89.5,}; // defines student1, student2, and initializes int main () {student1 = student2; // assign the values of student2 members to the cout <student1.num <endl; // output the cout value of the num member in student1 <student1.name <endl; // cout <student1.sex <endl; // cout <student1.birthday <endl; // error cout <student1.birthday. month <'/' <student1.birthday. day <'/' <student1.birthday. year <endl; // output the cout value of each birthday member in student1 <student1.score <endl; return 0 ;}/ * running result: Experience: knowledge point summary :*/