C coding...
I heard that C99 standard support inline functions in C...
But the following code is not getting compiled...
wats wrong with this...
plz someone help
#include %26lt;stdio.h%26gt;
inline int func(int i);
int main()
{
int i=5;
printf("\nBefore inline func...");
func(i);
printf("\nAfter inline func...\n\n");
return 0;
}
inline int func(int i)
{
printf("\nIn inline function...");
return i;
}
C coding...wats wrong with this Code... regarding inline function?
what compiler are you using, and what is the compiler error message?
if you're using a microsoft compiler you need to use the new style: __inline
also, make func() return void instead of int, since you aren't using the return value.
nil
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment