Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8306377
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T18:19:13+00:00 2026-06-08T18:19:13+00:00

For example, for copy/paste purposes , it is very convenient to write : C#

  • 0

For example, for copy/paste purposes, it is very convenient to write :

C#

@"
SELECT * FROM ......
WHERE X = (SELECT Y FROM .....)
    AND M IN ('1','2','3')
";

or

Python:

"""
SELECT * FROM ......
WHERE X = (SELECT Y FROM .....)
    AND M IN ('1','2','3')
"""

than:

C++

"SELECT * FROM ...... \
WHERE X = (SELECT Y FROM .....) \
    AND M IN ('1','2','3')"

Is there any way to avoid the \ style in C++ and approach to C# or python style?

Thanks.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T18:19:14+00:00Added an answer on June 8, 2026 at 6:19 pm

    I think C++11 allows newlines in raw string literals, e.g.:

    const char *query = R"(SELECT * FROM ...... 
                           WHERE X = (SELECT Y FROM .....) 
                           AND M IN ('1','2','3'))";
    

    Each newline in the source should result in a newline in the execution string-literal. Raw string literals generally take the form of R"( ... )". For GCC this requires at least version 4.5, and for clang++, it requires version 3.0. Alternatively, you can use a custom delimiter to make it easier to disambiguate the end of the string:

    const char *query = R"XXXX(SELECT * FROM ...... 
                           WHERE X = (SELECT Y FROM .....) 
                           AND M IN ('1','2','3'))XXXX";
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

When I copy-paste code from Websites (for example: http://www.west-wind.com/Weblog/posts/154812.aspx ) Visual Studio 2010 adds
When I copy a YouTube link, like this one, for example (http://www.youtube.com/watch?v=_Ka2kpzTAL8), and paste
I tried to copy this example from this Multiprocessing lecture by jesse noller (as
Can anybody show me (maybe copy/paste a simple code example) how to create the
We run some large directories where users often copy/paste content from word documents etc
I have copy/paste a script from a Bing basic tutorial over here: Bing basic
I was trying the TabLayout Tutorial from official developers site. I didnt copy paste
How do you customize the Copy/Paste behavior in Visual Studio 2008? For example I
Where do I go from here? This is almost just copy paste from the
Example: copy in one tmux pane (via vim), then switch to another pane (running

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.