FA> int a = 10,b = 99,c = 109;
FA> char ch1 = '+',ch2 = '=';
FA> char *text = "The sum of";
FA> printf("%s",func(text,a,ch1,b,ch2,c3,NULL);
FA> and then func() would peel off the pointers one by one, and perform some
FA> magic so it could find the length of and type of it, convert it to string
FA> if necessary,cat it to retstr and then some more magic finding and fetching
FA> the next one until it finds a NULL.
Ok, I see what you want to do, and no, you can't do that in C, and
you probably can't do it in C++ either. BTW, "NULL" = 0 usually,
so you wouldn't be able to tell the end anyway.
FA> This came on while i was using Visual Basic last weekend, and there
FA> you could have : mainstr = str1 + dec + long + str2 + single etc...all in
FA> the same sentence.
Well sprintf() will do that for you, but of course you have to
specify the format string. And zcalc probably has code in there
to evaluate an expression, too. BFN. Paul.
@EOT:
---
* Origin: X (3:711/934.9)
|