c++关于对象排序的问题

[复制链接]
查看11 | 回复0 | 2010-9-15 08:08:34 | 显示全部楼层 |阅读模式
# include"iostream"
# include"string"
using namespace std;
class directories
{public:
string name;
int tell;
int phont;
};
int main()
{int n, i,j;
cout>n;
directories str[10],temp;
for (i=0;istr.name>>str.tell>>str.phont;
}
coutstr[j].name)
temp=str;
str=str[j];
str[j]=temp;

}
}
cout>n;directories str[10],temp;for (i=0;istr.name>>str.tell
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

主题

0

回帖

4882万

积分

论坛元老

Rank: 8Rank: 8

积分
48824836
热门排行