一个难题,对C++有经验的人请进
我有一个工程在debug下面运行很好,但是我将它改为realease后发现编译后有很多error C2039的问题,求各位帮忙解答,代码及其错误提示如下。
Ref<ResultPointsAndTransitions> lSideOne(transitions[0]); Ref<ResultPointsAndTransitions> lSideTwo(transitions[1]); // Figure out which point is their intersection by tallying up the number of times we see the // endpoints in the four endpoints. One will show up twice. Ref<CornerPoint> maybeTopLeft; Ref<CornerPoint> bottomLeft; Ref<CornerPoint> maybeBottomRight; if (lSideOne->getFrom()->equals(lSideOne->getTo())) // error C2039: “getFrom”: 不是“ XX::Ref”的成员 { bottomLeft = lSideOne->getFrom(); maybeTopLeft = lSideTwo->getFrom(); maybeBottomRight = lSideTwo->getTo(); }
namespace XX{namespace datamatrix {using namespace std;ResultPointsAndTransitions::ResultPointsAndTransitions() : to_(), from_(), transitions_(0) { Ref<CornerPoint> ref(new CornerPoint(0,0)); from_ = ref; to_ = ref;}ResultPointsAndTransitions::ResultPointsAndTransitions(Ref<CornerPoint> from, Ref<CornerPoint> to, int transitions) : to_(to), from_(from), transitions_(transitions) {}Ref<CornerPoint> ResultPointsAndTransitions::getFrom() { return from_;}