David Harel wrote:
The code below works on VS but fails on gcc. Any idea?
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define STRINGIT(a) #a
#define FULL_PATH(d,f) STRINGIT(d##/##f)
Instead of the above two lines, try
#define FULL_PATH(d,f) d "/" f
int main()
{
char buf[1024];
strcpy(buf, FULL_PATH(c:/root, config));
And make that FULL_PATH("c:/root", "config")
printf("should be: c:/root/config. found: %s\n", buf);
}
Oron gave the actual reason.
Shachar
=================================================================
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]