void newit_1()
{
typedef struct {
string name;
double diameter;
double weight;
}Pizza;
Pizza *pizza = new Pizza ;//指针
cout << "How many big do you want?"<< endl;
(cin >> pizza[0].diameter).get() ;
cout << "Please enter the name of the company!"<<endl;
getline(cin , pizza[0].name);
cout << "weight?" << endl;
cin >> pizza[0].weight;
cout << "The name of the Pizza Company: " << pizza[0].name << endl;
cout << "The diameter of the Pizza Company: " << pizza[0].diameter<< endl;
cout << "The weight of the Pizza Company: " << pizza[0].weight << endl;
delete pizza;
}
(cin >> pizza[0].diameter).get() ;
这一行的get()有什么用,最好具体一点。为什么不能删去?