diff utility

Is this the proper use of 'diff' ??? and why can't I get this program to run...somebody please help me..

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
#include "time.h"
int main()
{
	Time begin;
	Time end;
	Time check_in;
	Time diff;
	int check;
	
	int h, m, s;
	begin.set (12,0, 0);
	end.set (18, 0, 0);

	cout << " enter hour, min, sec\n ";
	cin >>h>>m>>s;
	check_in.set (h, m, s);
	
	cout << " the time you checked in ";
	check_in.print ();

	if (check_in.Equal(begin))
		cout << "You are right on time. Lets go to lunch !! ";

	 if( check_in.LessThan(begin))
	 {
		 while(!begin.Equal(check_in))
		 {
			 begin.increment();
			 diff.increment;
		 }
		         h = diff.get_hour();
			 m = diff.get_mins();
			 s = diff.get_secs();

		   check = diff(begin.set:check_in:*s);  


		cout << " Good Morning you are early. You have to wait "<< check <<" for lunch !! ";
	 }
	 if( check_in.GreaterThan(begin))
	 {
		  while(!begin.Equal(check_in))
		 {
			 begin.increment();
			 diff.increment;
		 }
		         h = diff.get_hour();
			 m = diff.get_mins();
			 s = diff.get_secs();

		   check = diff(begin.set:check_in:*s); 
		cout << "Good Afternoon you are late. You have to wait "<< check <<" for dinner !! ";
	 }
	return 0;
}[code]
[/code]
Last edited on
Put your code between code tags or no-one is going to bother to read it. Click the "#" on the right under the word Format:.
Thanks. I never knew that...
Topic archived. No new replies allowed.