How to do it...

To avoid escaping characters, define the string literals with the following:

  1. R"( literal )" as the default form:
        auto filename {R"(C:UsersMariusDocuments)"s};
auto pattern {R"((w+)=(d+)$)"s};

auto sqlselect {
R"(SELECT *
FROM Books
WHERE Publisher='Paktpub'
ORDER BY PubDate DESC)"s};
  1. R"delimiter( literal )delimiter" where delimiter is any character sequence not present in the actual string when the sequence )" should actually be part of the string. Here is an example with !! as delimited:
        auto text{ R"!!(This text contains both "( and )".)!!"s }; 
std::cout << text << std::endl;
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset