Answer the question
In order to leave comments, you need to log in
How to insert quotes in a string?
The GSM modem needs to send the command: "AT+CSCS="GSM"" while it is impossible to send GSM in quotation marks . If you send it like this: "AT+CSCS=\"GSM\"" then a slash \ is also sent, an error occurs. If done differently: QString c = "0"; c[0] = 34; or char = "34"; then slashes are added to the string where this character will be used: " \ " How can you send quotes in the string without " \ " ?
Answer the question
In order to leave comments, you need to log in
On the nth try it worked "AT+CSCS=\"GSM\"\r" or rather after cleaning the folder with the built project.
enclose the whole expression in single quotes
Alternatively, use a backslash
Well, for the most appropriate answer, tell us what programming language are you talking about?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question