Question

#include <stdio.h>
int main(int argc, char *argv[]) {
char buffer[10];
strcpy(buffer, argv[1]);
printf("%s\n", &buffer);
}

how ever i'm getting the gcc error warning: incompatible implicit declaration of built-in function 'strcpy and when I do gdb its showing different strcpy 0x080483a7 : call 0x80482b8 "strcpy @ plt>" I don't know what is plt..

Était-ce utile?

La solution

add header

#include <string.h>
Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top