char *mystrncpy(char *s, constchar *t, int n)
{
int strcmp(constchar *s, constchar *t);
The bold part is a function declaration. I think you want to call strcmp here, not declare it (even if you want to declare it, it's not allowed at that point).
*s == *t
This is pointless - I really don't know what you're trying to achieve here. But it probably doesn't what you want because it will break the loop if the two strings are different, and cause a segfault if the two are equal.
‘\0’
This should be '\0' not `\0´ - that's a huge difference!
1 2
if (*s == ‘\0’)
return 0;
return *s - *t;
Again, pointless. What are you trying to achieve?
Actually, it doesn't look like you're on the right track at all. It rather looks like you completely copy&pasted a strcmp function from somewhere else into your mystrncpy function, and didn't do anything besides that.