by Ben Bacarisse <ben.usenet@[EMAIL PROTECTED]
>
Apr 15, 2008 at 12:40 PM
"Xiutao Yang" <xiutao.yang@[EMAIL PROTECTED]
> writes:
> I have a program about ## ,which is the following.
<snip>
> #define F(i) F_##i()
<snip more pre-processor mangling>
> The question is the I can call NEWW(i) in function void NEW(int i)
> But failed in processing function void FF(int i)?
> If we write void FF(int i) as:
> void FF(int i){
> F(i);
> }
> It will fail.
That is because FF(i) expands to F_i() and there is no F_i defined.
Presumably in NEWW(i) the value of i does not matter. You seem to
want the pre-processor (which runs once when you program is built) to
know about the value of variables at run-time. It just can't.
Back up a bit and explain what you are doing and why you think this is
the right solution.
--
Ben.