Hi guys. I have a function which needs to return a string (which is in an array)back to the main program.
The function prototype is:
char arrString(void);
char arrString()
{
char tempString1[15], tempString2[15];
statements...
statements...
strcpy(tempString1, tempString2);
return tempString1;
}
Somehow this doesn't work.
Any way how to do this? maybe using pointers?
Regards and thanks,
Darryl
The function prototype is:
char arrString(void);
char arrString()
{
char tempString1[15], tempString2[15];
statements...
statements...
strcpy(tempString1, tempString2);
return tempString1;
}
Somehow this doesn't work.
Any way how to do this? maybe using pointers?
Regards and thanks,
Darryl