c++ - Printing escape character -


When I'm given "d" "\" / "b" Print the statement letters for letters (D, B, slash, backslash, and 5 coats) in +. Now only errors shown are line if (i.at (j) = "\\") and else if (i.at (j) = "\" ") In addition, how should external repeat apostrophe be excluded?

  #include  Include # include & lt; cstdlib & gt; Namespace STD usage ; Int main (int argc, const char * argv []) for {string i = argv [1]; (int j = 0; j; = shapes (i) -1; j ++) {if (i .at (j) == '\\') {cout & lt; & quot; '\\';} and if (i.at (j) == '\ "') {cout & lt; & Lt; '\' '; } And {cout & lt; & Lt; I.at (j); }} Return 0; }  

* Modification - OK, so I correct double oposcripts to double oposcripts, but the code always stops at me.

You have your own equality test ( == , not = < / Code>).

Also, start with 1 index, and go up to 1 less (2 less, by index) than the length of the string.


Comments

Popular posts from this blog

windows - Heroku throws SQLITE3 Read only exception -

lex - Building a lexical Analyzer in Java -

python - rename keys in a dictionary -