This line
bool hasBackslash = (line.find("\\",0) != string::npos);
will look for\\
in the code.”
no it won’t. that’s exactly what you need if you want to search for a single backslash.
More Related Contents:
- Vectors, structs and std::find
- Where can I get a copy of the file libstdc++.so.6.0.15 [closed]
- Unresolved externals in C++ when using vectors and find
- Checking value exist in a std::map – C++
- Find mapped value of map
- expected ‘}’ at end of input [closed]
- Why should I not #include ?
- push_back vs emplace_back
- How do I expand a tuple into variadic template function’s arguments?
- How do I find the location of the executable in C? [duplicate]
- How to create an std::function from a move-capturing lambda expression?
- What will happen when I call a member function on a NULL object pointer? [duplicate]
- Compiling a C++ program with GCC
- Deprecation of the static keyword… no more?
- Why is out-of-bounds pointer arithmetic undefined behaviour?
- Why do we need to mark functions as constexpr?
- Syntax for universal references
- sort array by first item in subarray c++ [closed]
- smart pointers and arrays
- How can I solve the error LNK2019: unresolved external symbol – function?
- How do I create my own ostream/streambuf?
- What are your favorite C++ Coding Style idioms [closed]
- Windows/C++: Is it possible to find the line of code where exception was thrown having “Exception Offset”
- How do I stop name-mangling of my DLL’s exported function?
- c++11 regex slower than python
- Is NaN a valid key value for associative containers?
- Constructor initialization Vs assignment
- Branchless code that maps zero, negative, and positive to 0, 1, 2
- C++ bool returns 0 1 instead of true false
- returning an abstract class from a function