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;
}

'string' is a char *; your function returns a char.
.



Relevant Pages

  • Re: Cannot return values of char variable
    ... Pedro Pinto wrote: ... OK - so give us a simple testcase. ... char alterString ... temp receives a string and uses the alterString to modify it. ...
    (comp.lang.c)
  • Re: Loading a char value from an SQL parameter - Crashing!
    ... Even though the parameter is defined as being SqlDbType.Char it was showing ... as a string at the breakpoint. ... >> char - all other types are converting just fine. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Cannot return values of char variable
    ... Pedro Pinto wrote: ... You /cannot/ return a string from a function with return type ... `char`. ... Chris "unhashedup hashed up hashing" Dollin ...
    (comp.lang.c)
  • Re: How to add thousand separators
    ... First, this code is obsolete as written, because char is a dead data type and should not ... Note that both of these should be stored as string resources since they might need to be ... 18 digits for any reason. ... you have made a VERY SERIOUS DESIGN ERROR. ...
    (microsoft.public.vc.mfc)
  • Re: what is the best way of passing floats into a string
    ... I do not null-terminate as snprintf takes care of this (according to ... But the easiest way to determine the size needed to format a number, ... int length_of_representation(double n,const char* format){ ... I get a nice result of -10.000000 in my char * string. ...
    (comp.unix.programmer)