#include <iostream>
#include <string>
const int Size = 20;
char name[Size];
struct sss
{
char name[Size];
double A;
double B;
};
int main()
{
using namespace std;
sss *s = new sss;
cout << "Please to Enter the A:";
cin >> s->A;
cin.get(); // 这个是重点,没有此行就无法读取下边一行代码,
cout << "Enter the name:";
cin.getline(s->name,20);
cout << "Enter the B:";
cin >> s->B;
cout << "Weight: " << s->A << endl;
cout << "Name: " << s->name << endl;
cout << "Caloar: " << s->B << endl;
delete s;
return 0;
}