help in classes -

i dont understand the error codes here if someone can help
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
#include <iostream>;
#include <cmath>;

using namespace std;

class rational 
{
private:
	
	int num2;
	int denom2;
	
public:
	int num1;
	int denom1;
	double frac1;
	double frac2;

	void setnum1 (int) const;
	void setdenom1 (int) const;
	void setnum2(int) const;
	void setdenom2(int) const;
	void setfrac1(double);
	void setfrac2(double);


	int getnum1 ();
	int getnum2 ();
	int getdenom1 ();
	int getdenom2 ();
	double getfrac1();
	double getfrac2();

	
}

getfrac()
{

}

int getfrac (int numerator1, int denominator1)
{
	int num1;
	int denom1;
	num1 = numerator1;
	denom1= denominator1;
	
}

1
2
Error	4	error C4716: 'getfrac' : must return a value	c:\documents and settings\allisa\my documents\visual studio 2010\projects\numerator and denominator class\numerator and denominator class\rational.h	40	1	numerator and denominator class
Error	5	error C4716: 'getfrac' : must return a value	c:\documents and settings\allisa\my documents\visual studio 2010\projects\numerator and denominator class\numerator and denominator class\rational.h	48	1	numerator and denominator class
you have declared a function but you forgot to specify the return type
ok dumb question what is a return type?
Topic archived. No new replies allowed.