Re: [PHP-DEV] [C] struct, function pointers question
You're missing a variable name (you only put a type), and the line is not in the beginning of a code block (there's a statement before it). Zeev At 19:35 02-09-01, [EMAIL PROTECTED] wrote: Hi, I've got certain way to do something, but can't get it to compile. This relevant source is attached, I really expected it to compile... The errors are: struct_question.c: In function `some_function': struct_question.c:23: arithmetic on pointer to an incomplete type struct_question.c:23: parse error before `{' I'm desperate... Can someone give me some pointers? (possibly literally ;-) --jeroen -- PHP Development Mailing List http://www.php.net/ To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- Zeev Suraski [EMAIL PROTECTED] CTO co-founder, Zend Technologies Ltd. http://www.zend.com/ -- PHP Development Mailing List http://www.php.net/ To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP-DEV] [C] struct, function pointers question
Hi, I'm sure there's some simple (stupid?) error, which an experienced C-programmer can see immediately... But I don't. You're missing a variable name (you only put a type), and the line is not in the beginning of a code block (there's a statement before it). php_randgen_entry is (supposed to be) a type. php_randgen_entries is (supposed to be) a variable. php_randgen_entries[3] = { ... }; is (supposed to be) a statement. I'm still not seeing what's wrong... Zeev --jeroen -- PHP Development Mailing List http://www.php.net/ To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP-DEV] [C] struct, function pointers question
At 20:41 02-09-01, Jeroen van Wolffelaar wrote: Hi, I'm sure there's some simple (stupid?) error, which an experienced C-programmer can see immediately... But I don't. You're missing a variable name (you only put a type), and the line is not in the beginning of a code block (there's a statement before it). php_randgen_entry is (supposed to be) a type. php_randgen_entries is (supposed to be) a variable. php_randgen_entries[3] = { ... }; is (supposed to be) a statement. Ah, I thought that you meant to declare a variable here. The problem is different then - C doesn't support assigning to multiple struct members at once. You can only do that when you initialize a variable. Zeev -- PHP Development Mailing List http://www.php.net/ To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]