While trying to upload an image with cURL, I am confused because of the code below.
#define UPLOAD_FILE_AS "testImage.jpg"
static const char buf_1 [] = "RNFR " UPLOAD_FILE_AS;
What I want to understand is,
- exact type of defined
UPLOAD_FILE_AS
: array of char / string / or something else?
- exact operation performed in second line : After second line, buf_1 becomes
"RNFR testImage.jpg"
. But second line only have a space between "RNFR"
and UPLOAD_FILE_AS
. I've never heard a space can replace "+" operator or merging function. How is this possible?
question from:
https://stackoverflow.com/questions/65841540/using-define-to-a-string-in-c 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…