Archived

This topic is now archived and is closed to further replies.

Problems adding/coding a new class

This topic is 5150 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hey, I dont know what's wrong with me... I have pretty much an empty class coded and I'm getting errors compiling that alone! Please help! Here's the code: BezierPatchMesh.h
#ifndef __BEZIERPATCHMESH_H__
#define __BEZIERPATCHMESH_H__

#include "vector.h"
#include "point.h"

class beizerPatchMesh
{
public:
	bezierPatchMesh(void);
	~bezierPatchMesh(void);

private:
	/*
	void DestroyArrays(void);
	void CreateArrays(void);
	void SetupShape(void);
	void SetupPatch(int i, int j);
	void BezierPatch(int patchI, int patchJ, double u, double v, point &P, vector &N);

	point **b;
	point **tmpB;
	int udim, vdim;
	//int uwrap, vwrap;
	int nupatches, nvpatches;
	int udeg, vdeg;
	int ures, vres;
	//int glListNumber;
	//bool resize;
	//point pMin, pMax;
	*/
};

#endif

  
BezierPatchMesh.cpp:
#include "BezierPatchMesh.h"

bezierPatchMesh::bezierPatchMesh(void)
{
}

bezierPatchMesh::~bezierPatchMesh(void)
{
}
  
Here are my errors: Compiling... BezierPatchMesh.cpp c:\path.to\bezierpatchmesh.h(11) : error C2523: 'beizerPatchMesh::~bezierPatchMesh' : destructor tag mismatch c:\path.to\bezierpatchmesh.cpp(3) : error C2653: 'bezierPatchMesh' : is not a class or namespace name c:\path.to\bezierpatchmesh.cpp(6) : warning C4508: 'bezierPatchMesh' : function should return a value; 'void' return type assumed c:\path.to\bezierpatchmesh.cpp(8) : error C2653: 'bezierPatchMesh' : is not a class or namespace name c:\path.to\bezierpatchmesh.cpp(9) : error C2084: function 'int __cdecl bezierPatchMesh(void)' already has a body Error executing cl.exe. I'm know I'm making a dumb mistake somewhere... but I'm can't pinpoint what my problem is. Any help greatly appreciated! Thanks, Pete notes: MS Visual C++ 6.0, I'm adding a new class to an existing program that works fine. The namespaces are different, etc., etc... I haven't issued an "include BezierPatchMesh.h" in the program besides at the top of BezierPatchMesh.cpp [edited by - pschmitt on November 10, 2003 12:00:17 AM]

Share this post


Link to post
Share on other sites