Microsoft C startup code uses the following rules when interpreting arguments given on the operating system command line:Arguments are delimited by white space, which is either a space or a tab. A string surrounded by double quotation s is interpreted as a single argument, regardless of white space contained within. A quoted string can be embedded in an argument. Note that the caret (^) is not recognized as an escape character or delimiter. A double quotation preceded by a backslash, \", is interpreted as a literal double quotation ("). Backslashes are interpreted literally, unless they immediately precede a double quotation . If an even number of backslashes is followed by a double quotation , then one backslash (\) is placed in the argv array for every pair of backslashes (\\), and the double quotation (") is interpreted as a string delimiter. If an odd number of backslashes is followed by a double quotation , then one backslash (\) is placed in the argv array for every pair of backslashes (\\) and the double quotation is interpreted as an escape sequence by the remaining backslash, causing a literal double quotation (") to be placed in argv.
str.Fromat("%i", \
iInput);相当
str.Fromat("%i",iInput);
你才搞错了哦,注释是 //
A string surrounded by double quotation s is interpreted as a single argument, regardless of white space contained within. A quoted string can be embedded in an argument. Note that the caret (^) is not recognized as an escape character or delimiter.
A double quotation preceded by a backslash, \", is interpreted as a literal double quotation (").
Backslashes are interpreted literally, unless they immediately precede a double quotation .
If an even number of backslashes is followed by a double quotation , then one backslash (\) is placed in the argv array for every pair of backslashes (\\), and the double quotation (") is interpreted as a string delimiter.
If an odd number of backslashes is followed by a double quotation , then one backslash (\) is placed in the argv array for every pair of backslashes (\\) and the double quotation is interpreted as an escape sequence by the remaining backslash, causing a literal double quotation (") to be placed in argv.
我见过多的是定义宏的时候,因为宏的定义要求在一行的:
#define FF(a, b, c, d, x, s, ac) { \
(a) += F ((b), (c), (d)) + (x) + (UINT4)(ac); \
(a) = ROTATE_LEFT ((a), (s)); \
(a) += (b); \
}
#define GG(a, b, c, d, x, s, ac) { \
(a) += G ((b), (c), (d)) + (x) + (UINT4)(ac); \
(a) = ROTATE_LEFT ((a), (s)); \
(a) += (b); \
}
呵呵!!
#define TRACE_BEGIN(fname) logfile = fopen(fname,"w"); \
if (logfile == NULL) { \
cout<<"Log file "<<fname<<" open error."<<endl;\
fclose(logfile); \
} \
sprintf(logbuf, "*** start logging %s***\n", gettime()); \
LOG2FILE(logfile, logbuf);