関数main()で{...}
1)#includeヘッダーファイルstring.h
2)自分のファイルのプロトタイプを作成し、strcpyと呼びます。
**char *strcpy(char *strSource , const char *dest);**
3) main()のstring.hで「実際の」 strlen関数も使用したいと思います。
4)別のコンパイルファイルに自分のバージョンのstrcpyがあります。
質問:string.hのプロトタイプではなく、自分のバージョンのstrcpyをリンカーに選択させるにはどうすればよいですか?
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;
}