Using "..." with Serial not possible

Hi everyone,
I write:
Serial.println("({not "possible" code})");
in my code and compilation is not possible. The output says:
Compilation error: unable to find string literal operator 'operator""possible' with 'const char [14]', 'unsigned int' arguments
so I assume using "..." with Serial ist not possible.
Unfortunately I can´t find any information about this thing in the internet. Do any of you have experience with this topic?
Is it impossible to use with the standard methods?
Thank's for your answer!

Poor assumption. Use the escape character \ to place the double quote in a C-string:


char s[] = "test=\" 1";

Welcome to the forum

Please post a complete sketch, using code tags when you do, that illustrates the problem

If you really have that line of code in the sketch then I am not surprised that it does not compile. What exactly are you trying to print ?

Thanks for answering! Escape sequences was new for me. It solved my problem.

Thanks :slight_smile:
I will do so in the future.
I try to simulate sending a JASON string from an ESP8266 to my Arduino.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.