How can I re-write this strcpy() function using pointers only? : <p>this is strcpy code</p>

<pre><code>char *strcpy(char *dest, const char* src)
#endif
{
    char *ret = dest;
    while (*dest++ = *src++)
        ;
    return ret;
}
</code></pre>

<p>I tried to implement it using swap method and pointers only</p>

<pre><code>char *strcpy(char *dest, char *src)
{
char *ret = dest;
dest = src;
src = ret;
return ret
}
</code></pre>

<p>but the swap method didn't work,can any one tell me if it's proper to use swap method to perform strcpy() function? if not, how can I write this code using ponters notation only?</p>
