OK, the following way to return a string works fine:
char* SU(double V) {
static char Str[80];
// Do something
return Str;
}
printf("%s", SU(A));
But the following will fail silently because the string space in memory is the same at the end of both calls:
printf("%s %s", SU(A), SU(B));
How can I do this cleanly and simply ? I was looking at alloca() but I don't think I can return a string allocated with alloca(), can I ?