I can't change a lot of things in this code due to certain limitations on the assignment. Here is the code:
#include <iostream>
#include<cstdlib>
#include<cstring>
using namespace std;
struct MyTime { int hours, minutes, seconds; };
int DetermineElapsedTime(const MyTime *t1, const MyTime *t2);
const int hourSeconds = 3600;
const int minSeconds = 60;
int DetermineElapsedTime(const MyTime *t1, const MyTime *t2)
{//problem about static in next line
static MyTime ((long) (((t2.hours * hourSeconds) + (t2.minutes * minSeconds) + t2.seconds) -
((t1.hours * hourSeconds) + (t1.minutes * minSeconds) + t1.seconds)));
return(MyTime);
}
It is not the entire thing but I need to somehow calculate the amount of time from primary input to the other. I will need to used setfill too.
Anyway, does anyone know how to fix the error about needing a primary expression before static?