c++ - check if string contains back slash -


i use file dialog file name. use name in processing. problem file name contains backslash char \ , when use path in programming language must change \ character \\. how can solve problem slash?

when use path in programming language must change '\' char "\"

that not true.

first of all, escaping backslashes takes place adding backslash, not replacing single quotes double quotes. that's nonsensical.

secondly, every programming language different many broad generalisations need in "any programming language" absurd.

furthermore, in c++, when writing characters string literal need escape backslashes, because in string literals unescaped backslashes allow enter unreadable/unwriteable characters directly source code. once resulting string in memory, doesn't matter contains backslashes.

you not have change anything.


Comments

Popular posts from this blog

javascript - How do I find how many occurences are there of a highlighted string, and which occurence is it? -

javascript - How to synchronize the Three.js and HTML/SVG coordinate systems (especially w.r.t. the y-axis)? -

java - Reading data from multiple zip files and combining them to one -