thethiny thethiny - 1 year ago 121
C++ Question

Raw Strings in Code::Blocks?

I am reading a directory from a file, for example I loaded this

, so I want to create the folders Main and Characters. I tried using this method (after removing from the string)":

string syntax = "md "+path;

However, '\' is counted as an escape and not a backslash, the optimal solution is to replace every '\' with a '\' but that would increase my tool from O(n) to O(2n) given that it needs 30 seconds to fully finish each part. Is there a way to use Raw strings in Code::Blocks? as
didn't do the job for me. (R is not declared in this scope).

Any other solution that doesn't revolve around Raw strings is also welcome.

Answer Source

Answer 1 - Upgrade to another Compiler. Answer 2 - Simply replace every \ with \

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download