I am writing a function that will take time as three integer arguments (for hours,minutes, and seconds), and returns the number of seconds since the last time the clock "struck 12". I will then use this function to calculate the amount of time in seconds between two times, both of which are within on 12-hour cycle of the clock. I am getting error messages like crazy. Any advice would be appreciated.

#include <iostream>

using namespace std;

int get_sec(int, int, int); //function prototype

int main()

{
int hh, mm, ss;

cout << "Enter Hour, Minutes, and Seconds: " << endl;
cin >> hh >> mm >> ss;

cout <<"Seconds Since 12: "<< get_sec(hh,mm,ss) <<endl;

int hh1, mm1, ss1;
cout <<"Enter First Time Hour, Minute, and Second: " <<get_sec(hh,mm,ss)<<endl;

cin >> hh1 >> mm1 >> ss1;

int hh2,mm2, ss2;

cout <<"Enter Second Time Hour, Minute, and Second:"<<get_sec(hh,mm,ss)<<endl;
cin>> hh2 >> mm2 >> ss2>>

int d;
d = get_sec(hh1, mm1, ss1) -get_sec(hh2, mm2, ss2);

cout << "Difference between two times: " <<="0)";

}
sec; return min; + hr="hr" sec="sec" ; 60 * min="min"; { sec)

int min, hr, (int get_sec 0; <<d<< ? times: two between ?Difference << cout -1; d="d" (d if>

return 0;

}

The error messages that I am getting are:

error C2062: type 'int' unexpected
error C2065: 'd' : undeclared identifier
error C2676: binary '<<=' : 'class std::basic_ostream<char,struct std::char_traits<char> >' does not define this operator or a conversion to a type acceptable to
the predefined operator
warning C4508: 'main' : function should return a value; 'void' return type assumed
error C2501: 'sec' : missing storage-class or type specifiers
error C2143: syntax error : missing ';' before 'return'
error C2143: syntax error : missing ';' before '+'
error C2143: syntax error : missing ';' before 'constant'
error C2447: missing function header (old-style formal list?)

2. the code tags > you

4. <code> </code>
replace the < with [ and replace the > with ]
and put ur code inbetween to preserve formatting.

5. Code:
```cin>> hh2 >> mm2 >> ss2>>

int d;```
should be

Code:
```cin>> hh2 >> mm2 >> ss2;

int d;```
Code:
`cout << "Difference between two times: " <<="0)";`
ain't gonna work. Don't know what you want from it but the problem is <<="0)"; get rid of the '=' and you will get rid of the error but as I say, I don't know if it will give you what you actually want.

Then your compiler is having a barney here

Code:
```}
sec; return min; + hr="hr" sec="sec" ; 60 * min="min"; { sec)

int min, hr, (int get_sec 0; <<d<< ? times: two between ?Difference << cout -1; d="d" (d if>```
and rightly so. The '}' finishes your main () function and everything else is just hanging in free space. You need to re-think the position and number of parentheses. Not to mention that I can't make head nor tail of the last 2 lines of that code. I don't mean to be rude but it's meaningless.