#include "iostream.h"
#include "stdio.h"
class Plane
{
private:
char s[50],w[50];
int a,b;
public:
void set()
{
gets(s);
gets(w);
cin>>a;
cin>>b;
}
void print()
{
cout<<s<<' '<<w<<' '<<a<<' '<<b<<endl;
}
};
void main()
{
cout<<"输入:";
Plane p;
p.set();
p.print();
}
很想知道这个程序究竟是按怎样的顺序执行的??
为什么cout<<"输入"这条语句会在输入了两个字符串之后才执行呢??