user29519: This is kind of a short question. All I want to know is, if I can define a string using single quotation marks ('), instead of the regular ones("). I want to use it in a function like this: 
print('Hello world'); 
I unfortunately do not have an Arduino nearby so I cannot test it myself.

user4143: No, you can't.  'x' defines a single character or integer (note: 'ab' is a two-byte single value [integer] made up from the ASCII values of both characters).
To include " within a string you have two options:

Escape the " with \, as in: char foo[] = "He said \"Hello there\".";
Use "raw strings" if the compiler is configured to support it: char foo[] = R"(He said "Hello there".)";

Option 1 is the most portable since it doesn't require compiler support for modern C++ standards. However it's the hardest to read, especially when you get lots of escapes in the same string.
You can make it more readable by defining QUOTE:
#define QUOTE "\""

char foo[] = "He said " QUOTE "Hello there" QUOTE ".";


user7508: No, you cannot. This rules comes from the basic C++ syntax on which the Arduino platform is built.

29519: <p>This is kind of a short question. All I want to know is, if I can define a string using single quotation marks ('), instead of the regular ones("). I want to use it in a function like this: 
print('Hello world'); </p>

<p>I unfortunately do not have an Arduino nearby so I cannot test it myself.</p>
 4143: <p>No, you can't.  <code>'x'</code> defines a single character or integer (note: <code>'ab'</code> is a two-byte single value [integer] made up from the ASCII values of both characters).</p>

<p>To include <code>"</code> within a string you have two options:</p>

<ol>
<li>Escape the <code>"</code> with <code>\</code>, as in: <code>char foo[] = "He said \"Hello there\".";</code></li>
<li>Use "raw strings" if the compiler is configured to support it: <code>char foo[] = R"(He said "Hello there".)";</code></li>
</ol>

<p>Option 1 is the most portable since it doesn't require compiler support for modern C++ standards. However it's the hardest to read, especially when you get lots of escapes in the same string.</p>

<p>You can make it more readable by defining QUOTE:</p>

<pre><code>#define QUOTE "\""

char foo[] = "He said " QUOTE "Hello there" QUOTE ".";
</code></pre>
 7508: <p><strong>No</strong>, you cannot. This rules comes from the basic C++ syntax on which the Arduino platform is built.</p>
