#include <iostream>
#include <time.h>
#include <string>
int caculateYadFromFurlong(int furlong);
using namespace std;
int main(void)
{
struct student
{
char name[20];
int age;
};
student *stu = new student;
cout << "Please Enter student's name:";
cin.get(stu->name,20);
cout << "Enter student's age:";
cin >> (*stu).age;
cout << "student's name is " << stu->name << " age is " << stu->age << endl;
cin.get();
cin.get();
}
int caculateYadFromFurlong(int furlong)
{
return furlong*220;
}
C++动态结构练习
最新推荐文章于 2022-04-26 10:54:54 发布