void max_idxs(vector<int> &pidxs){
vector<fragment *> ids;
max_ids(ids);
for(size_t i = 0; i < ids.size(); i++){
int weight_idx = ids[i]->weight_idx; //Get weight index
}
}
在這個C++代碼中,int weight_idx = ids[i]->weight_idx;
是什麼意思?這個C++語句是什麼意思?
->
是什麼意思?
謝謝!
大家知道,' - >'操作符通常沒有空格使用(例如'ids [i] - > weight_idx') – 2010-08-13 17:15:46
奇怪。我從來沒有見過像這樣使用空格周圍的' - >'。 – 2010-08-13 17:18:14
@Shawn D:現在有空格 @Justin:是的,在原代碼中沒有空格 這是我的打字錯誤,我編輯了它 – ladyfafa 2010-08-13 17:23:02