C Error Parameter Has Incomplete Type
Contents |
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more c error field has incomplete type about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges error field has incomplete type struct Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each error aggregate has incomplete type other. Join them; it only takes a minute: Sign up How to resolve “parameter has incomplete type” error? up vote -1 down vote favorite I'm a newbie and I need help with debugging my code. When I compile it
Error Aggregate Has Incomplete Type And Cannot Be Defined
'type of formal parameter 1 is incomplete' and type of formal parameter 2 is incomplete' error appears in printf("Age is %d years.\n", calc_age(birth, current)); while 'parameter 1 ('birth') has incomplete type' and ' parameter 2 ('current') has incomplete type' errors appear in int calc_age (struct date birth, struct date current) { Help is appreciated, thanks! #include
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company type of formal parameter 1 is incomplete Business Learn more about hiring developers or posting ads with us Stack Overflow Questions
Variable Has Incomplete Type Struct
Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers,
How To Pass Structure To A Function In C
just like you, helping each other. Join them; it only takes a minute: Sign up parameter has incomplete type up vote 0 down vote favorite I get the warning "parameter has incomplete type" in the last http://stackoverflow.com/questions/29371704/how-to-resolve-parameter-has-incomplete-type-error line. But I have no idea why. struct clockClass { uint32_t (*getClock) (void); bool (*setCorrectionFactor)(uint32_t newCorrectionFactor); uint32_t (*getCorrectionFactor) (void); }; /* Type definition for ::virtualClock */ typedef struct clockClock ClockClass; /* VC Synchronization Class */ struct vcSync_sRio { bool (*vcSync)(ClockClass me); /*Warning LINE*/ }; c struct typedef share|improve this question edited Feb 15 '13 at 10:34 LihO 26.8k44392 asked Feb 15 '13 at 10:21 user1829804 4415 3 struct clockClass { but typedef struct http://stackoverflow.com/questions/14892568/parameter-has-incomplete-type clockClock ClockClass; I see the difference, do you? –aragaer Feb 15 '13 at 10:23 Which compiler are you using? GCC, Visual Studio? Anything else? Any specific warning number? –bash.d Feb 15 '13 at 10:23 @aragaer Nice one! Didn't get it until you pointed it out :) –bash.d Feb 15 '13 at 10:24 @aragaer Oh Fu... –user1829804 Feb 15 '13 at 10:26 add a comment| 2 Answers 2 active oldest votes up vote 1 down vote It seems it's just a typo: you have defined struct clockClass but your typedef defines an alias for struct clockClock. Change your typedef to: typedef struct clockClass ClockClass; share|improve this answer answered Feb 15 '13 at 10:24 LihO 26.8k44392 add a comment| up vote 0 down vote Change the line to: bool (*vcSync)(struct ClockClass me); or change the other line to: typedef struct ClockClass ClockClass; share|improve this answer answered Feb 15 '13 at 10:22 Alexey Frunze 45k83787 add a comment| Your Answer draft saved draft discarded Sign up or log in Sign up using Google Sign up using Facebook Sign up using Email and Password Post as a guest Name Email Post as a guest Name Email discard By posting your answer, you agree to the privacy policy and terms of service. Not the answer you're looking
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with http://stackoverflow.com/questions/13425879/parameter-has-incomplete-type-in-c us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up parameter has incomplete type in C up vote 1 down vote favorite 2 I'm writing some code, when I'm trying to test my code till now, I get an error. Here is my code: #include