You don't need the & to reference the char * because it is already a pointer to a character, you don't want char ** which is a pointer to a pointer to a character.
I patched it up:
void my_strcpy(char** dest, const char* src) {
const char * srcTemp = src;
int i = 1; //+1 for null char
while (*srcTemp != '\0') {
srcTemp++;
i++;
}
char * destTemp = (char*)malloc(sizeof(char)*i);
*dest = destTemp;
while (*src != '\0') {
*destTemp = *src;
src++;
*destTemp++;
}
*destTemp = *src; //copy null char
}
int _tmain(int argc, _TCHAR* argv[])
{
const char* s = "Hello World";
char* test = 0;
my_strcpy(&test, s); // Suposed to change test form d to Hello World.
printf("Changed String: ");
printf("%s", test);
return 0;
}