I have created #define statement in project’s pch file so it can be seen in all files in the project, the statement is: #define MYURL(x,y) @"http://internal-sps/providers.aspx?category=(a)®ionID=(y)"
however, I use this macro in any file inside the project like this:
NSString *url = MYURL(@"category1",@"3");
then NSLog(@"%@", url); the console shows this:
http://internal-sps/providers.aspx?category=(a)®ionID=(y) not the actual values.
how can i get the actual values for this macro ?
Change:
#define MYURL(x,y) @"http://internal-sps/providers.aspx?category=(a)®ionID=(y)"to:
#define MYURL(x,y) "http://internal-sps/providers.aspx?category=(a)®ionID=("y")"and use your macro like this:
NSString *url = @MYURL("category1","3");Note: if that
ais actually meant to be anxthen it would be:#define MYURL(x,y) "http://internal-sps/providers.aspx?category=("x")®ionID=("y")"