C++ Error: Class has no member
<p>So I've searched the similar postings for a solution to my issue, but none of them seem to apply.  After racking my brain with this, I'm asking for help.  It really stumps me...  Please assist!</p>

<p>The compiler error is as follows:</p>

<pre><code>subdivider.cpp:47: error: ‘class BPatch’ has no member named ‘surfacePoint’
</code></pre>

<p>subdivider.cpp:</p>

<pre><code>#include "subdivider.h"

SubDivider::SubDivider(){
}

SubDivider::SubDivider(PatchVect patchList, float subdivisions, string subdivType){

    _patchList = patchList;
    _subdivisions = subdivisions;
    _type = subdivType;
    _polyList = PolyList();
}

PolyList SubDivider::getPolygonList(){return _polyList;}

vector&lt;pair&lt;Point3D, Point3D&gt; &gt; SubDivider::getPointList(){ return _surfacePointsAndNormals;}


void SubDivider::subdivide(){
    vector&lt;BPatch&gt; patchVect = _patchList.getVect();
    if(_type.c_str() == "-a"){
        for(int i = 0; i&lt;patchVect.size(); i++){
            adaptiveSubDiv(patchVect.at(i));
        }
    }
    if(_type.c_str() == "-u"){

        for(int i = 0; i&lt;patchVect.size(); i++){
            uniformSubDiv(patchVect.at(i));
        }
    }
}

void SubDivider::uniformSubDiv(BPatch bPatch){

    for (float v = 0; v&lt;1; v += _subdivisions){
        for(float u = 0; u&lt;1; u += _subdivisions){
            pair&lt;Point3D, Point3D&gt; pointPair = bPatch.surfacePoint( u, v); //LINE 47 (THIS IS WHERE ERROR IS)
            _surfacePointsAndNormals.push_back( pointPair );
        }
    }
}


void SubDivider::adaptiveSubDiv(BPatch bPatch){
}
</code></pre>

<p>subdivider.h:</p>

<pre><code>#ifndef _SUBDIVIDER_BEZ
#define _SUBDIVIDER_BEZ
#include "patchlist.h"
#include "polylist.h"
#include &lt;string&gt; 
using namespace std;
class SubDivider {
public:
    SubDivider();
    SubDivider(PatchVect patchList, float subdivisions, string subdivType);

    PolyList getPolygonList();
    vector&lt;pair&lt;Point3D, Point3D&gt; &gt; getPointList();
    void subdivide();
    void uniformSubDiv(BPatch bPatch);
    void adaptiveSubDiv(BPatch bPatch);
private:
    vector&lt;pair&lt;Point3D, Point3D&gt; &gt; _surfacePointsAndNormals;
    PatchVect _patchList;
    PolyList _polyList;
    float _subdivisions;
    string _type;
};


#endif
</code></pre>

<p>bpatch.h: </p>

<pre><code>#ifndef _BPATCH_BEZREND
#define _BPATCH_BEZREND

using namespace std;
#include &lt;utility&gt;

class Point3D{
public:
    Point3D();
    Point3D(float x, float y, float z);
    float getX();
    float getY();
    float getZ();
    Point3D pointAdd(Point3D q);
    Point3D pointMinus(Point3D q);
    Point3D pointMult(Point3D q);
    Point3D scalarMult(float s);
    Point3D crossProd(Point3D q);
    Point3D normalize();
private:
    float _x;
    float _y;
    float _z;
};

class BPatch{
public:
    BPatch();
    Point3D getPoint(int i,int j);
    Point3D setPoint(int i,int j, Point3D p);
    pair&lt;Point3D, Point3D&gt; surfacePoint(float u, float v); //inspired by code provided in lecture 12 (Surfaces) slides

private:
    Point3D _controlPs[4][4];
};

static pair&lt;Point3D, Point3D&gt; curvePoint(Point3D* pArr, float u); //inspired by code provided in lecture 12 (Surfaces) slides

#endif
</code></pre>

<p>bpatch.cpp:</p>

<pre><code>#include "bpatch.h"
#include &lt;cmath&gt;

using namespace std;

Point3D::Point3D(){
}
Point3D::Point3D(float x, float y, float z){
    _x = x;
    _y = y;
    _z = z;
}
float Point3D::getX(){return _x;}

float Point3D::getY(){return _y;}

float Point3D::getZ(){return _z;}

Point3D Point3D::pointAdd(Point3D q){
    float x = getX() + q.getX();
    float y = getY() + q.getY();
    float z = getZ() + q.getZ();
    Point3D newPoint = Point3D(x, y, z);
    return newPoint;
}

Point3D Point3D::pointMinus(Point3D q){
    float x = getX() - q.getX();
    float y = getY() - q.getY();
    float z = getZ() - q.getZ();
    Point3D newPoint = Point3D(x, y, z);
    return newPoint;
}

Point3D Point3D::pointMult(Point3D q){
    float x = getX() * q.getX();
    float y = getY() * q.getY();
    float z = getZ() * q.getZ();
    Point3D newPoint = Point3D(x, y, z);
    return newPoint;
}

Point3D Point3D::scalarMult(float s){
    float x = getX() * s;
    float y = getY() * s;
    float z = getZ() * s;
    Point3D newPoint = Point3D(x, y, z);
    return newPoint;
}

Point3D Point3D::crossProd(Point3D q){
    float x, y, z;
    x = (getY()*q.getZ()) - (getZ()*q.getY());
    y = (getZ()*q.getX()) - (getX()*q.getZ());
    z = (getX()*q.getY()) - (getY()*q.getX());
    Point3D newPoint = Point3D(x, y, z);
    return newPoint;
}

Point3D Point3D::normalize(){
    float x, y, z, magnitude;
    magnitude = getX()*getX() + getY()*getY() + getZ()*getZ();
    magnitude = sqrt(magnitude);
    x = getX() / magnitude;
    y = getY() / magnitude;
    z = getZ() / magnitude;
    Point3D newPoint = Point3D(x, y, z);
    return newPoint;
}

static pair&lt;Point3D, Point3D&gt; curvePoint(Point3D* pArr, float u){ //inspired by code provided in lecture 12 (Surfaces) slides
    Point3D A, B, C, D, E, curveP, temp1, temp2, curvePDeriv;
    float minusU1 = 1.0 - u;
    temp1 = pArr[0].scalarMult(minusU1);
    temp2 = pArr[1].scalarMult(u);
    A = temp1.pointAdd(temp2);

    temp1 = pArr[1].scalarMult(minusU1);
    temp2 = pArr[2].scalarMult(u);
    B = temp1.pointAdd(temp2);

    temp1 = pArr[2].scalarMult(minusU1);
    temp2 = pArr[3].scalarMult(u);
    C = temp1.pointAdd(temp2);


    temp1 = A.scalarMult(minusU1);
    temp2 = B.scalarMult(u);
    D = temp1.pointAdd(temp2);

    temp1 = B.scalarMult(minusU1);
    temp2 = C.scalarMult(u);
    E = temp1.pointAdd(temp2);


    temp1 = D.scalarMult(minusU1);
    temp2 = E.scalarMult(u);
    curveP = temp1.pointAdd(temp2);

    temp1 = E.pointMinus(D);
    curvePDeriv = temp1.scalarMult(3);

    return make_pair(curveP, curvePDeriv);
}


BPatch::BPatch(){
}

//BPatch::BPatch(Point3D points[][4]){
//  _controlPs = points;
//}

Point3D BPatch::getPoint(int i,int j){
    return _controlPs[i][j];
}

Point3D BPatch::setPoint(int i,int j, Point3D p){
    _controlPs[i][j] = p;
}


pair&lt;Point3D, Point3D&gt;  BPatch::surfacePoint(float u, float v){
    Point3D vCurve[4], uCurve[4], t0[4], t1[4], t2[4], t3[4], t4[4], t5[4], t6[4], t7[4];
    Point3D p, n;
    pair&lt;Point3D, Point3D&gt; surfPointAndDerivU;
    pair&lt;Point3D, Point3D&gt; surfPointAndDerivV;

    t0[0]=_controlPs[0][0];
    t0[1]=_controlPs[0][1];
    t0[2]=_controlPs[0][2];
    t0[3]=_controlPs[0][3];

    t1[0]=_controlPs[1][0];
    t1[1]=_controlPs[1][1];
    t1[2]=_controlPs[1][2];
    t1[3]=_controlPs[1][3];

    t2[0]=_controlPs[2][0];
    t2[1]=_controlPs[2][1];
    t2[2]=_controlPs[2][2];
    t2[3]=_controlPs[2][3];

    t3[0]=_controlPs[3][0];
    t3[1]=_controlPs[3][1];
    t3[2]=_controlPs[3][2];
    t3[3]=_controlPs[3][3];

    vCurve[0] = curvePoint(t0, u).first;
    vCurve[1] = curvePoint(t1, u).first;
    vCurve[2] = curvePoint(t2, u).first;
    vCurve[3] = curvePoint(t3, u).first;

    t4[0] = _controlPs[0][0];
    t4[1] = _controlPs[1][0];
    t4[2] = _controlPs[2][0];
    t4[3] = _controlPs[3][0];

    t5[0] = _controlPs[0][1];
    t5[1] = _controlPs[1][1];
    t5[2] = _controlPs[2][1];
    t5[3] = _controlPs[3][1];

    t6[0] = _controlPs[0][2];
    t6[1] = _controlPs[1][2];
    t6[2] = _controlPs[2][2];
    t6[3] = _controlPs[3][2];

    t7[0] = _controlPs[0][3];
    t7[1] = _controlPs[1][3];
    t7[2] = _controlPs[2][3];
    t7[3] = _controlPs[3][3];

    uCurve[0] = curvePoint(t4, v).first;
    uCurve[1] = curvePoint(t5, v).first;
    uCurve[2] = curvePoint(t6, v).first;
    uCurve[3] = curvePoint(t7, v).first;

    surfPointAndDerivU = curvePoint(uCurve, u);
    surfPointAndDerivV = curvePoint(vCurve, v);

    n = surfPointAndDerivU.second.crossProd(surfPointAndDerivV.second);
    n = n.normalize();

    p = surfPointAndDerivU.first;

    pair&lt;Point3D, Point3D&gt; newPair = make_pair(p, n);
}
</code></pre>

<p>for what its worth, here's the makefile as well:</p>

<pre><code>CC = g++
ifeq ($(shell sw_vers 2&gt;/dev/null | grep Mac | awk '{ print $$2}'),Mac)
    CFLAGS = -g -DGL_GLEXT_PROTOTYPES -I./include/ -I/usr/X11/include -DOSX
    LDFLAGS = -framework GLUT -framework OpenGL \
        -L"/System/Library/Frameworks/OpenGL.framework/Libraries" \
        -lGL -lGLU -lm -lstdc++
else
    CFLAGS = -g -DGL_GLEXT_PROTOTYPES -Iglut-3.7.6-bin
    LDFLAGS = -lglut -lGLU
endif

RM = /bin/rm -f 
all: bezrender

bezrender:  bpatch.o patchlist.o polylist.o loadpatch.o subdivider.o ogler.o bezrender.o 
    $(CC) $(CFLAGS) -o bezrender bpatch.o patchlist.o polylist.o loadpatch.o  subdivider.o ogler.o bezrender.o $(LDFLAGS) 

bpatch.o: bpatch.cpp bpatch.h
    $(CC) $(CFLAGS) -c bpatch.cpp -o bpatch.o

patchlist.o: patchlist.cpp patchlist.h bpatch.h
    $(CC) $(CFLAGS) -c patchlist.cpp -o patchlist.o

polylist.o: polylist.cpp polylist.h
    $(CC) $(CFLAGS) -c polylist.cpp -o polylist.o

loadpatch.o: loadpatch.cpp loadpatch.h patchlist.h
    $(CC) $(CFLAGS)  -c loadpatch.cpp -o loadpatch.o


subdivider.o: subdivider.cpp subdivider.h patchlist.h polylist.h 
    $(CC) $(CFLAGS) -c  subdivider.cpp -o subdivider.o

ogler.o: ogler.cpp ogler.h polylist.h
    $(CC) $(CFLAGS) -c ogler.cpp -o ogler.o  

bezrender.o: bezrender.cpp bezrender.h polylist.h loadpatch.h ogler.h
    $(CC) $(CFLAGS) -c bezrender.cpp -o bezrender.o

clean: 
    $(RM) *.o bezrender
</code></pre>

<p>Thank you so much in advance!!</p>
