Re: Cannot return values of char variable
- From: "CoL" <apraghuvanshi@xxxxxxxxx>
- Date: 3 Nov 2006 03:59:52 -0800
Hi,
yup fuction sinature should be char* and more over when you passing
char* from main to temp and temp to alterstring make sure in
alterstring plays around with its value not address.
else pass alterstring(&string)----making its signature.
char* alterstring(char** str).This way your return string would hold
the new allocated memory address and its value.
Regards
Ap
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;
}
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.
I've tried changing the signatures of the functions to
char temp(char string){
char alterString(char string){}
but the issue still occurs......
Can please somebody give me just a little example of the working
function.......... it would really help.....
thanks in advance for every support you have given to me this night.
.
- References:
- Cannot return values of char variable
- From: Pedro Pinto
- Cannot return values of char variable
- Prev by Date: Re: string search?
- Next by Date: Re: Cannot return values of char variable
- Previous by thread: Re: Cannot return values of char variable
- Next by thread: Re: Cannot return values of char variable
- Index(es):
Relevant Pages
|
|