Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the C++ equivalent to 'r' prefix with strings in Python?

Tags:

c++

python

In python, I can so the next valid code:

r"path\path.exe"

This allowed me use one slash('\') sign instead of two. Is there any equivalent in cpp?

like image 304
ede wd Avatar asked Dec 22 '16 16:12

ede wd


1 Answers

The closest equivalent is a raw string literal:

 R"x(path\path.exe)x"
like image 136
πάντα ῥεῖ Avatar answered Sep 22 '22 10:09

πάντα ῥεῖ