@StarSky
2017-07-04T02:52:01.000000Z
字数 1151
阅读 866
工作日记
C++
I solve this question by restart CLion 😄
CommonSegmentor::getPoint(elementInfo[4].center, Yrange, Xrange);
I noticed that there is a red wavy line under the elementInfo[4].center
And the message is
Parameter type mismatch:types vector<Point> and vector<Point, allocator<Point>> are not compatible
I am not sure whether the warming is related to memory allocation, but it refers to the allocator.
I have a try changing the return to void, but it don' work. 🤷
There is the function.
void CommonSegmentor::getPoint(vector<Point> ¢er,Vec2i Yrange,Vec2i Xrange){
vector<Point>::iterator iter;
for(iter = center.begin();iter != center.end();iter++){
Point pointTemp = {(*iter).x - Xrange[0],(*iter).y - Yrange[0]};
(*iter) = pointTemp;
}
}
elementInfo[4] is a struct named TransformedXYInfo.
struct TransformedXYInfo{
int flag;
Point topPoint;
Point bottomPoint;
float elementWidth;
vector<Point> center;
};
To avoid modifying the config frequently, we were told to create a new folder in the root directory.[hmmm....😄
Then I asked my colleagues how to change the permissions of the document, I get the command:
chown -R saber:staff export
A digression, It's there any frame in C++ jusf like spring in Java?
ref:
http://www.cnblogs.com/peida/archive/2012/12/04/2800684.html