日期:2014-05-16  浏览次数:20651 次

求教:error: field ‘start’ has incomplete type

C/C++ code

#include <stdio.h>
#include <time.h>
struct A
{
    struct timeval start;
};
int main(int argc, char **argv)
{
    printf("hello world\n");
    return 0;
}



error: field ‘start’ has incomplete type

------解决方案--------------------
#include <sys/time.h>