title: Retrieve the name of the computer and saved it in a variable
body: <p>I'm learning win32 programming with C/C++. In the process of learning, my teacher wanted I write a simple program that it can shows the name of the computer which It runs on it and Then, if the name of the target computer was "USER", shows a warning in the output console. I written the following code, but It doesn't work. </p>
  
  <p>myFunction Code : </p>
  
  <pre><code>tchar * getComputerName() {
          bufCharCount = INFO_BUFFER_SIZE;
          if (!GetComputerName(infoBuf, &amp;bufCharCount))
              printError(TEXT("GetComputerName"));
          return (TCHAR*)infoBuf;
      }
  </code></pre>
  
  <p>calling code : </p>
  
  <pre><code>if (getComputerName() == (TCHAR*)"USER") {
              printf("Target OS Detected \n");
          }
  </code></pre>
  
  <p>how can i fix this issue?</p>