by "Xiutao Yang" <xiutao.yang@[EMAIL PROTECTED]
>
Apr 15, 2008 at 11:02 PM
thank you for your nice.
The reason is that i want to try ##.
some days ago, i was asked about that :P
"Ben Bacarisse" <ben.usenet@[EMAIL PROTECTED]
> ??????:874pa3jqhd.fsf@[EMAIL PROTECTED]
> "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.