本文整理汇总了C++中MyList::append方法的典型用法代码示例。如果您正苦于以下问题:C++ MyList::append方法的具体用法?C++ MyList::append怎么用?C++ MyList::append使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MyList
的用法示例。
在下文中一共展示了MyList::append方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: main
int main(int argc, char** argv) {
MyList myList;
myList.append(2);
myList.insertN(1,2);
myList.insertN(3,3);
myList.prepend(0);
myList.display();
return 0;
}
示例2: main
//.........这里部分代码省略.........
val->setNum(tmp);
n->replace("p", val);
}
}
for (it.toFirst();it.current();++it) { //Parkplaetze bewerten
n = nl_i->find(it.currentKey());
if ((n->classname()).compare("agriculture") == 0){
QString *val = new QString("0.0");
unsigned int size=((*n)["size"])->toUInt();
if(size>4700){
n->replace("p", val);
}
}
}
nl_i->calcNewGEOValues(gN,gS,gW,gE,newX,newY,xRes,yRes);
MyList hl;
it.toFirst();
while(it.current()) {
float p;
//<<<<<<< ga_bu_industrie.cpp
// if (!(*it)["p"]) p=0.5;
// else p=(*it)["p"]->toFloat();
// if(p>0.0000001) {
// Help* h = new Help(p,it.currentKey());
// hl.append(h);
// }
//=======
if (!(**it)["p"]) p=(float)0.987;
else p=(**it)["p"]->toFloat();
Help* h = new Help(p,it.currentKey());
hl.append(h);
//>>>>>>> 1.6
++it;
}
hl.sort();
newX = int((gE-gW) / xRes);//calculate new image size
newY = int((gN-gS) / yRes);//calculate new image size
qDebug("$$$newX: %d, newY: %d, xRes: %f, yRes: %f, gN: %f, gS: %f, gE: %f, gW: %f",
newX, newY, xRes, yRes, gN, gS, gE, gW);
QFile fp(argv[2]); // 'XML' - description
if (!fp.open(IO_WriteOnly)) qDebug("write: file not accesable to %s\n",argv[2]);
QTextStream str(&fp);
QDict<int> dict( 17, FALSE ); //dictionary for the class nr.
QArray<NodeInfo*> infolist(nl_i->size()+1); // array of pointers to NodeInfo
Help *pl;
int i = 1;
int helplabel = 0;//, label = 0;
Image out_img(typeid(signed int),newX,newY,1); //generate out image
#ifdef WIN32
QArray <int> vec(nl_i->size()+1);
#else
int vec[nl_i->size()+1];
#endif
for (int ix=0; ix<nl_i->size()+1; ix++) vec[ix]=0; //info for labeling
out_img.setGeoCoordinates(gW,gN,gE,gS);
for ( pl=hl.first(); pl != 0; pl=hl.next() ) {
Node *node=nl_i->find(pl->cl_name());
//label = node->id();
NodeInfo* ni = new NodeInfo(newX, newY);
ni->id(i);