p_Reverse.c:155: error: conflicting types for 'mystrrev'
p_Reverse.c:145: error: previous implicit declaration of 'mystrrev' was here
Implicit declaration is a real antifeature left over from the days of yore. You can enable warnings/errors (or C99 mode) to prevent it from hurting you.
On line 145, you have a call to mystrrev
and your compiler has likely presumed that it was declared int mystrrev(int)
. Later, on line 155, where you define it to be char *mystrrev(char *)
, it conflicts with the "original" presumed to be int mystrrev(int)
.
Add a declaration of your function before anywhere it's used (towards the top of the file) like so:
char *mystrrev(char *val);