|
From: <v-...@ou...> - 2002-05-13 17:05:55
|
Hello,
In university I am doing a programming course and last week we had an
excercise using a given function to measure time:
----------------------------8< schnipp------------------------------
double MyTime() {
struct timeval Tp;
gettimeofday (&Tp, NULL);
return Tp.tv_sec + (Tp.tv_usec /10000000.);
}
----------------------------schnapp >8------------------------------
At home I wanted to finish the program using Dev-C++ (current beta with
fixed exe), but the compiler refused work when compiling this function
with the message
----------------------------8< schnipp------------------------------
aggregate `struct timeval Tp' has incomplete type and cannot be
initialized
----------------------------schnapp >8------------------------------
But in university (under Linux) it does work....so is this a problem of
the compiler (gcc versions differ in university and at home) or a
platform problem (Linux specific parts)? Sorry, I am no expert, just had
two weeks of this course and I am only used to basic (under DOS).
Chau
V-Li
|