Probably your array definition has something top do with the C2440.
The C2664 is caused by a mismatch in the type of the third argument versus what you supplied. It looks like the third argument needs to be an int and you supplied an int*
I can't tell since you didn't post the definitions of your variables or your function prototype.
You mioght read this on arrays:
Thanks for the reply. I am still working on it. Here is the entire code.
#include<stdio.h>
#include<string.h>
#include<stdlib.h>
#define MSIZE 81
void separate (char[], char[], int);/*function prototype*/
int main()
{
char date [MSIZE];
char tempmonth[MSIZE];
int tempday;
printf("\nEnter a month and a day. (Ex. June 14)\n");
gets_s(date);
printf("You entered: %s\n", date);
char *pttempmonthaddr;
int *pttempdayaddr;
pttempmonthaddr = &tempmonth;
pttempdayaddr = &tempday;
separate(date, pttempmonthaddr, pttempdayaddr);/*function call*/
printf("\nThe month entered is %s and day entered is %f.\n", *pttempmonthaddr, *pttempdayaddr);
return 0;
}
void separate(char *strin, char *strout, int *iout) /*function header*/
{
iout = 0;
while(*strin != '/0' && *strin != ' ')
*strout++ = *strin++;
*strout = '\0';
while (*strin != '\0' && *strin != ' ')
*strin++;
if(*strin != '\0')
*iout = atoi(strin);
}