warning: missing terminating ” character [enabled by default]

You have to:

  1. to escape " char because of it is a special char used to define a C-String literal.
  2. For multi line strings you must define each line as a single C-String using "" for each one

So, the resulting code is

  char * string = "{"
                  "\"sender\" : \"joys of programming\","
                  "\"receiver\": [ \"123\","
                                  "\"345\","
                                  "\"654\","
                                  "\"432\""
                                "]"
                 "}";

Leave a Comment