![]() |
| ||
| Wats the problem in this Prog??? I'm getting an error msg as Type mismatch in redeclaration of 'putw' for the following code... Can anyone suggest the reason for this??? #include<stdio.h> |
| ||
| Re: Wats the problem in this Prog??? Name putw() to something different like putword(). Most likely there's an implementation of putw() already prototyped in your compiler library. Please, make sure you use proper tags when you post code next time. Here's how. |
| ||
| Re: Wats the problem in this Prog??? @ AIA Thanks .... There existed a function in lib.. But the declaration of function was int putw(int w, FILE *stream) the only difference between this and the declaration in prog above is that short int is being used in the putw function... Does that cause a problem??? |
| ||
| Re: Wats the problem in this Prog??? >Does that cause a problem??? There can not be two functions named with the same identifier. Even if they both do the same. |
| ||
| Re: Wats the problem in this Prog??? Moreover, visually identical functions with int and short int arguments have different compiled bodies codes and calling codes too. For example, to pass short int arg the compiler emits "push half-word" CPU instruction but for int arg it emits "load word" instruction... |
| All times are GMT -4. The time now is 12:07 pm. |
Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2009 DaniWeb® LLC