Why does:
Give me this error:Code:static struct timeval TIMEOUT = { 25, 0 };
error: variable ‘TIMEOUT’ has initializer but incomplete type
warning: excess elements in struct initializer
warning: (near initialization for ‘TIMEOUT’)
???
Why does:
Give me this error:Code:static struct timeval TIMEOUT = { 25, 0 };
error: variable ‘TIMEOUT’ has initializer but incomplete type
warning: excess elements in struct initializer
warning: (near initialization for ‘TIMEOUT’)
???
Last edited by [email protected]; 01-06-2012 at 06:37 PM.
Probably because timeval is not defined anywhere...
[email protected]:
You should Google your error messages before coming here to ask. Most of the compiler messages you're getting have been explained numerous times on numerous forums. We're happy to help, but there's no sense in us answering it again.
Am I the only one that's suspicious that this guy copied code from somewhere and is trying to get it to compile?
I mean, 3 minutes before this thread --> http://cboard.cprogramming.com/c-pro...%92-token.html
memcpythat's exactly what I'm doing. The software is Varkon and I'm trying to determine if it will run under Cygwin. Apparently others have tried but I see no answers as to whether anyone has succeeded so I figured I'd give it a go.
anduril462 I googled it first, usually do. Still no idea as to whether there are multiple versions of timeval (c v. c++) and I'm using the wrong one OR if it's part of a library that I don't know about OR if the documentation I'musing is inaccurate OR if I've actually misspelled something.
I'm only guessing as to what an initializer is to begin with.
All I know is every example I have found thus far says my syntax is correct.
I apologize if I have sent this question to the experts forum by mistake.
You are once again missing the right header.
The compiler does not know everything about type "timeval".
Tim S.
Last edited by stahta01; 01-09-2012 at 01:40 PM. Reason: grammer
"...a computer is a stupid machine with the ability to do incredibly smart things, while computer programmers are smart people with the ability to do incredibly stupid things. They are,in short, a perfect match.." Bill Bryson
Thanks stahta01 !!!
Turns out there was a typo in the d/l. It was including the wrong time.h.
4 days later and she finally compiles without a hitch.
fyi-Varkon_1.19D does NOT run under Cygwin. At least not for me.
cheers