I have some problems with using pointers in Dynamic. What I want is to call a function that returns an array. I tried the following:
char *itpp(int n, char buf[])
{
sprintf(buf, “%d”, n);
return buf;
}
void main(){
auto int i;
auto char buf[25];
auto char *str;
i = 23;
*str = itpp(i, buf);
while (1){
}
}
But this doesn’t seem to work. Can anybody help me?