All pastes #367580 Raw Edit

Untitled

public text v1 · immutable
#367580 ·published 2007-02-22 13:17 UTC
rendered paste body
#include <stdio.h>

int main(){
char *fp = 0;

fp = func();

printf("%s\n",fp);

return(0);
}


char *func(){

char *test = 0;

test = "blah";

return(test);
}



max@debian-VM:~/code/c/ELF$ gcc functest.c -o ft
functest.c: In function 'main':
functest.c:8: warning: assignment makes pointer from integer without a cast
functest.c: At top level:
functest.c:16: error: conflicting types for 'func'
functest.c:8: error: previous implicit declaration of 'func' was here
max@debian-VM:~/code/c/ELF$