Составители:
Рубрика:
68 Глава 5. Сортировка
{
if(top==0)
{
cout << "Стек пуст\n";
return 0;
}
top--;
return stck[top];
}
inline void push2(stack <int> &s, int A, int B);
class address
{
char name[40];
char street[40];
char city[10];
char zip[11];
public:
address(char *n,char *s,char *c, char *z);
address(){};
int operator<(address &ob)
{
return strcmp (zip, ob.zip)<0;
}
friend ostream &operator<<(ostream &stream, address &ob);
};
address::address(char *n,char *s,char *c, char *z)
{
strncpy(name, n);
strncpy(street, s);
strncpy(city, c);
strncpy(zip, z);
}
ostream &operator<<(ostream &stream, address &ob)
68 Глава 5. Сортировка { if(top==0) { cout << "Стек пуст\n"; return 0; } top--; return stck[top]; } inline void push2(stack&s, int A, int B); class address { char name[40]; char street[40]; char city[10]; char zip[11]; public: address(char *n,char *s,char *c, char *z); address(){}; int operator<(address &ob) { return strcmp (zip, ob.zip)<0; } friend ostream &operator<<(ostream &stream, address &ob); }; address::address(char *n,char *s,char *c, char *z) { strncpy(name, n); strncpy(street, s); strncpy(city, c); strncpy(zip, z); } ostream &operator<<(ostream &stream, address &ob)
Страницы
- « первая
- ‹ предыдущая
- …
- 66
- 67
- 68
- 69
- 70
- …
- следующая ›
- последняя »