title: Error: no operator "==" matches these operands
body: <p>This isn't actually my code, but I need help right here. Since I'm new to coding, I don't know how to fix this problem.</p>
  <pre><code>bool GetProcessEntryByName(string name, PROCESSENTRY32* pe) {
      auto snapshot = CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, 0);
      if (snapshot == INVALID_HANDLE_VALUE) {
          cerr &lt;&lt; &quot;Tool helper cannot be created&quot; &lt;&lt; endl;
          return false;
      }
  
      if (!Process32First(snapshot, pe)) {
          cerr &lt;&lt; &quot;Tool helper cannot retrieve the first entry of process list&quot; &lt;&lt; endl;
          return false;
      }
  
      do {
          if (pe-&gt;szExeFile == name) {
              snapshot ? CloseHandle(snapshot) : 0;
              return true;
          }
      } while (Process32Next(snapshot, pe));
  
      snapshot ? CloseHandle(snapshot) : 0;
      return false;
  }
  </code></pre>
  <p>And the error occurs at: <code>if (pe-&gt;szExeFile == name)....</code></p>
  <p>Output:</p>
  <pre><code>1&gt;------ Rebuild All started: Project: EzExecV2, Configuration: Debug x64 ------
  1&gt;main.cpp
  1&gt;E:\Desktop\Coding\Test\main.cpp(45,28): error C2678: binary '==': no operator found which takes a left-hand operand of type 'std::string' (or there is no acceptable conversion)
  1&gt;C:\Program Files (x86)\Windows Kits\10\Include\10.0.19041.0\shared\guiddef.h(192,15): message : could be 'bool operator ==(const GUID &amp;,const GUID &amp;)'
  1&gt;D:\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.26.28801\include\random(2056,24): message : or       'bool std::operator ==(const std::bernoulli_distribution &amp;,const std::bernoulli_distribution &amp;)'
  1&gt;E:\Desktop\Coding\Test\main.cpp(45,28): message : or       'built-in C++ operator==(WCHAR [260], WCHAR [260])'
  1&gt;E:\Desktop\Coding\Test\main.cpp(45,28): message : while trying to match the argument list '(std::string, WCHAR [260])'
  1&gt;E:\Desktop\Coding\Test\main.cpp(106,24): warning C4305: 'argument': truncation from '__int64' to 'DWORD'
  1&gt;E:\Desktop\Coding\Test\main.cpp(106,9): warning C4309: 'argument': truncation of constant value
  1&gt;E:\Desktop\Coding\Test\main.cpp(111,27): warning C4305: 'argument': truncation from '__int64' to 'DWORD'
  1&gt;E:\Desktop\Coding\Test\main.cpp(111,9): warning C4309: 'argument': truncation of constant value
  1&gt;E:\Desktop\Coding\Test\main.cpp(133,23): warning C4305: 'argument': truncation from '__int64' to 'DWORD'
  1&gt;E:\Desktop\Coding\Test\main.cpp(133,9): warning C4309: 'argument': truncation of constant value
  1&gt;E:\Desktop\Coding\Test\main.cpp(137,24): warning C4305: 'argument': truncation from '__int64' to 'DWORD'
  1&gt;E:\Desktop\Coding\Test\main.cpp(137,9): warning C4309: 'argument': truncation of constant value
  1&gt;Done building project &quot;Test.vcxproj&quot; -- FAILED.
  ========== Rebuild All: 0 succeeded, 1 failed, 0 skipped ==========
  </code></pre>
  <p>I'm using Unicode Char Set</p>
  <p>I don't know if there is a more detailed log for the build. If there is, tell me where I can find it.</p>