This question already has answers here:
C++ Multi-line comments using backslash
(3 answers)
What does a backslash in C++ mean?
(4 answers)
Closed 2 years ago.
Why the next line after //\ is commented out in C++ ? Like I know about "//" and "/* ... */ " but after putting //\ the next line is automatically commented out !
\ at the end of a line is line continuation for comments and preprocessor.
Related
This question already has answers here:
Regular expression for alpahbet,underscore,hyphen,apostrophe only
(5 answers)
Closed 2 years ago.
I want to make a pattern for input.
I have this [A-Za-z]|-, but if I type dsadsa$ this, the special characters still allowed and I need only
big and small letters, and - .
You can escape - character:
[A-Za-z\-]
Your expression should be like following:
([A-Za-z\-]+)
([\w-]+)
This question already has an answer here:
Reference - What does this regex mean?
(1 answer)
Closed 4 years ago.
I am looking at someone elses code and have a question. Below is the code. Where it says: ^DR DUE does that mean the string starts with DR DUE? I am new to perl regular expressions. Also, where ATM/(DEP|WTD) does this mean match ATM/(DEP|WTD) in the string? However, I thought that ( and ) were metacharacters too. Thanks for your help!
Removed
It will match a string containing
the string "COAL"
"DR DUE TO ATM/" placed at beginning of line and followed by "DEP" or "WTD".
So it will match:
COAL
(beginning of line)DR DUE TO ATM/DEP ERROR
(beginning of line)DR DUE TO ATM/WTD ERROR
This question already has an answer here:
What does 'R' mean in the context of string literals?
(1 answer)
Closed 4 years ago.
Specifically in this file
https://github.com/fireice-uk/xmr-stak/blob/master/xmrstak/backend/amd/amd_gpu/opencl/cryptonight.cl
The first line is this and the end ends with
)==="
And it seems to be sprinkled within.
Could someone explain what this is and does? I'm having a difficult time googling this.
The format for the raw-string literals[2] is: R"delimiter( raw_characters )delimiter", so === is the delimiter in R"===( and line 243 in your link
This question already has answers here:
"Stray '\226' in program" compiler errors [duplicate]
(2 answers)
Closed 7 years ago.
theRunners[i] |= (1ULL << (((runnerList)atoll(token)) – 1ULL));
Why is the line giving the following strange error?
error: stray ‘\226’ in program
What's wrong?
In the text you have pasted: the – sign is actually the character 0x96, which in the Windows-1252 code page is a sort of hyphen.
You must use the ASCII minus sign instead; try deleting that piece of code and re-typing it.
Make sure you are using a plaintext editor - some word processors will automatically change punctuation to "funky" alternative versions.
This question already has answers here:
Closed 11 years ago.
Possible Duplicate:
What do single quotes do in C++ when used on multiple characters?
The following code compiles in C++:
unsigned int x;
x = 'abc';
What does it mean? Is putting string between quotation marks legal? What does it do?
Is not a string, but a multi character literal. See What do single quotes do in C++ when used on multiple characters?. (Vote to close as duplicated)