function prototype problem
Mark Lawrence
mark at drd.UUCP
Sat Nov 12 06:52:39 AEST 1988
I compile the following code fragment:
--
#include <stdio.h>
char *rpeet ( short, char );
char rpeet_temp[81];
char *rpeet ( num, ch )
short num;
char ch;
{
int i;
memset( rpeet_temp, ch, num );
rpeet_temp[num] = '\0';
return( rpeet_temp );
}
--
and get the following gripe from my compiler (gcc 1.30):
rpeet.c: In function rpeet:
rpeet.c:9: argument `num' doesn't match function prototype
rpeet.c:9: argument `ch' doesn't match function prototype
Am I doing something wrong here or is the compiler just grumpy today?
(Please respond by e-mail. I don't normally read this group).
Mark
tulsun!drd!mark at Sun.COM
DRD Corporation mlawrence at jarsun1.ZONE1.COM
(918)743-3013 drd!mark at apctrc.UU.NET
okstate!romed!drd!mark at rutgers.EDU
More information about the Comp.lang.c
mailing list