In function main() {...}
1) #include header file string.h
2) I prototype my own file, call it strcpy:
**char *strcpy(char *strSource , const char *dest);**
3) I also wish to use the "real" strlen function in string.h in main().
4) In another compilation file I have my version of strcpy.
Question: How can I get the linker to choose my version of strcpy instead of the prototype in string.h?
enter code here
#include <conio.h>
#include <string.h>
char *strcpy(char *source , const char *dest);
void main()
{
char *s, *d;
strcpy(s,d);
getch();
}
#include <stdio.h>
char *strcpy(char *strDestination, const char *strSource)
{
char *ptr;
printf("made it!");
return ptr;
}