TM> Write your own function that does what you think is possible
TM> and see for yourself that it doesn't work!
Ahhhhhh...... having tried the C-snippet at the bottom of the page (and just managing 
to get a
null param) - I see what you mean.

DOH - From what I knew of C I thought this would work - I thought
this'd work.

Thanks for the patient tutoring, I got there eventually :-P

-=Ian=-

/************** CODE STARTS HERE ***********8/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

void changestr(char *str) {
  char *newstr=(char *)calloc(10,sizeof(char));
  strcpy(newstr,"123456789");
  str=newstr;

}

void main(void) {
 char *newstring=NULL;
 changestr(newstring);
 printf("After Funct=%s\n",newstring);
}


Reply via email to