Re: Cannot return values of char variable



Pedro Pinto wrote:
Hi there once more........

Instead of showing all the code my problem is simple.

I've tried to create this function:

char temp(char *string){

alterString(string);
return string;
}

This function is defined as returning a char, but it is trying to return a char *.

char alterString(char *string){}

temp receives a string and uses the alterString to modify it.

My issue is simple, when i pass the argument string to alterString it
appears in the function alterString has being empty.

Maybe it was empty when passed to temp. There is no way to tell from what you have given. Create a small, complete program that displays the problem, and post it. Then people might be able to help.

--
Thomas M. Sommers -- tms@xxxxxx -- AB2SB

.



Relevant Pages