# 向量类字符串排序[英] vector class string sort

### 问题描述

{

int ref;

part_info() : part_no(""), raw_qty(""), qty(0), ref(0) {}
part_info(string NewPartNo, string NewRawQty, int NewQty, int
NewRef) : part_no(NewPartNo), raw_qty(NewRawQty), qty(NewQty),

};

.....

NAMEVECTOR theVector;
NAMEVECTOR::iterator theIterator;
.....

//将数据集添加到我的向量中
theVector.push_back(part_info(part_no,raw_qty,qty, ref));

}

typedef vector

## 推荐答案

Venthor 写道:

{

int ref;

part_info() : part_no(""), raw_qty(""), qty(0), ref(0) {}
part_info(string NewPartNo, string NewRawQty, int NewQty, int
NewRef) : part_no(NewPartNo), raw_qty(NewRawQty), qty(NewQty),

};

....

NAMEVECTOR theVector;
NAMEVECTOR::iterator theIterator;
....

//将数据集添加到我的向量中
theVector.push_back(part_info(part_no,raw_qty,qty, ref));

}

typedef 向量

5 月 10 日下午 3:38，Venthor <vent...@gmail.com 写道:

{

int ref;

part_info() : part_no(""), raw_qty(""), qty(0), ref(0) {}
part_info(string NewPartNo, string NewRawQty, int NewQty, int
NewRef) : part_no(NewPartNo), raw_qty(NewRawQty), qty(NewQty),

};

....

NAMEVECTOR theVector;
NAMEVECTOR::iterator theIterator;
....

//将数据集添加到我的向量中
theVector.push_back(part_info(part_no,raw_qty,qty, ref));

}

typedef 向量重载然后排序成员应该为你排序向量.

>你好，

{

int ref;

part_info() : part_no(""), raw_qty(""), qty(0), ref(0) {}
part_info(string NewPartNo, string NewRawQty, int NewQty, int
NewRef) : part_no(NewPartNo), raw_qty(NewRawQty), qty(NewQty),
ref(NewRef) {}

};

....

NAMEVECTOR theVector;
NAMEVECTOR::iterator theIterator;
....

//将数据集添加到我的向量中
theVector.push_back(part_info(part_no,raw_qty,qty,ref));

}

--