user541686
user541686

Reputation: 210643

What is the '\?' Escape Sequence in D?

What is the \? string escape sequence in D?

Upvotes: 8

Views: 258

Answers (1)

Peter Alexander
Peter Alexander

Reputation: 54290

It's just to escape ?, a literal question mark.

There really is no reason for it to be in D, but it existed in C and C++ in order to avoid the question mark being interpreted as a Trigraph. D doesn't have Trigraphs, so its inclusion must simply be for some added backwards compatibility with C and C++.

Upvotes: 6

Related Questions