error C2065: 'colourFunc' : undeclared identifier

I'm trying to create a simple class for an OenGL project but my threshold.cpp can't seem to detect the existence of some strings. Oh, and I'm using Microsoft Visual C++ 2008 Express edition.
Here's the code for the header:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#include <iostream>
#include <fstream>
#include <string>
#include "gl/glut.h"

using namespace std;

class threshold{
private:
	
public:
	int lowT, highT, opacity, red, green, blue;
	string colourFunc, opacityFunc;
	double opacityMult;
	bool applied;
	threshold();
	threshold(int newLowT, int newHighT);	
	void apply();
	void unapply();
	void setColour(int newRed, int newGreen, int newBlue);
	void setColourFunc(string newFunc);
	void setOpacityMult(double newMult);
	void setOpacity(int newOp);
	void setOpacityFunc(string newFunc);
	double getOpacityMult();
	int getOpacity();
	int getRedColour();
	int getGreenColour();
	int getBlueColour();
	void increaseOpacityMult();
	void decreaseOpacityMult();
	void setLowT(int newT);
	void setHighT(int newT);
	int getLowT();
	int getHighT();
};


And the .cpp:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
#include "threshold.h"
#include <iostream>
#include <fstream>
#include <string>
#include <sstream>

using  std::string;

threshold::threshold(){
	lowT = 0;
	highT = 0;
	opacityMult = 1;
	applied = false;
}

threshold::threshold(int newLowT, int newHighT){
	lowT = newLowT;
	highT = newHighT;
	opacityMult = 1;
	applied = false;
}

void threshold::apply(){
	applied = true;
}

void threshold::unapply(){
	applied = false;
}

void threshold::setColour(int newRed, int newGreen, int newBlue){
	red = newRed;
	green = newGreen;
	blue = newBlue;
}

int threshold::getRedColour(){
	return red;
}
int threshold::getGreenColour(){
	return green;
}
int threshold::getBlueColour(){
	return blue;
}

void setColourFunc(string newFunc){
	colourFunc = newFunc;
}

void threshold::setOpacity(int newOp){
	opacity = newOp;
}

void setOpacityFunc(string newFunc){
	opacityFunc = newFunc;
}

int threshold::getOpacity(){
	return opacity;
}

void threshold::setOpacityMult(double newMult){
	opacityMult = newMult;
}

double threshold::getOpacityMult(){
	return opacityMult;
}

void threshold::increaseOpacityMult(){
	opacityMult = opacityMult + 0.1;
}

void threshold::decreaseOpacityMult(){
	opacityMult = opacityMult - 0.1;
}

void threshold::setLowT(int newT){
	lowT = newT;
}

void threshold::setHighT(int newT){
	highT = newT;
}

int threshold::getLowT(){
	return lowT;
}

int threshold::getHighT(){
	return highT;
}


And the Errors:
1
2
1>c:\4e2\texture\texture\threshold.cpp(48) : error C2065: 'colourFunc' : undeclared identifier
1>c:\4e2\texture\texture\threshold.cpp(56) : error C2065: 'opacityFunc' : undeclared identifier


I haven't gotta clue what I'm doing wrong! Any ideas?

P.S. I'm new here, so sorry in advance if I postd incorrectly!?!
Last edited on
At lines 47 and 55 you forgot "threshold::"
closed account (z05DSL3A)
Line 47 and 55 are missing threshold::
OMG! Sorry bout that.
I feel like a twat
Thanx!
Topic archived. No new replies allowed.