Re: pre-processor string replacement
- From: Ian Collins <ian-news@xxxxxxxxxxx>
- Date: Sun, 14 Jan 2007 21:06:03 +1300
sam_cit@xxxxxxxxxxx wrote:
Hi Everyone,What did you expect to see?
I have the following question regarding string replacement
pre-processor statement,
#define status "23"
#define status "44"
int main()
{
printf("%s\n", status);
}
this works fine and prints 44
where as
#define status "23"
#define status1 status
int main()
{
printf("%s\n", status);
}
prints 23, string replacement occurs on the pre-processor statement
itself, which is not in case 1, why is it so?
Can anyone help me on this?
--
Ian Collins.
.
- Follow-Ups:
- Re: pre-processor string replacement
- From: sam_cit
- Re: pre-processor string replacement
- References:
- pre-processor string replacement
- From: sam_cit
- pre-processor string replacement
- Prev by Date: Re: pre-processor string replacement
- Next by Date: Re: Best Place to Define TRUE/FALSE
- Previous by thread: Re: pre-processor string replacement
- Next by thread: Re: pre-processor string replacement
- Index(es):
Relevant Pages
|