Go back to Richel Bilderbeek's homepage.

Go back to Richel Bilderbeek's C++ page.

 

 

 

 

 

(C++) string literal

 

A string literal is a character sequence enclosed with double quotes [1]. A single character enclosed in single quotes is called a character literal [2]. Use raw strings for string literals with complicated uses of backslash [3].

 

 

 

 

 

Examples

 

 

 

 

 

 

References

qt

 

  1. Bjarne Stroustrup. The C++ Programming Language (4th edition). 2013. ISBN: 978-0-321-56384-2. Chapter 7.3.2. String Literals, page 176
  2. Bjarne Stroustrup. The C++ Programming Language (4th edition). 2013. ISBN: 978-0-321-56384-2. Chapter 7.2.3.2. Character Literals, page 143
  3. Bjarne Stroustrup. The C++ Programming Language (4th edition). 2013. ISBN: 978-0-321-56384-2. Chapter 7.8. Advice, page 199: '[8] Use raw strings for string literals with complicated uses of backslash'

 

 

 

 

 

Go back to Richel Bilderbeek's C++ page.

Go back to Richel Bilderbeek's homepage.

 

Valid XHTML 1.0 Strict