title: How to zip a folder in my Win32 Visual C++ app using a system call
body: <p>I am trying to zip a folder in my Win32 Visual C++ app using a system call. On my computer, I can do this by the cmd command:</p>
  <pre><code>PowerShell -Command &quot;Compress-Archive -Path  C:\Users\ttyler\Desktop\Software\Folder2\RUN -DestinationPath C:\Users\ttyler\Desktop\Software\Folder2\RUN&quot;
  </code></pre>
  <p>Where &quot;Try&quot; is a folder.</p>
  <p>I am trying to do this on my app using a System call, but in my app, I have the &quot;Path&quot; and the &quot;DestinationPath&quot; stored in variables (because the destination path is being pulled in by the user). I'm not sure I'm using the variables correctly in my system call because this is giving me the error: &quot;'+': cannot add two pointers&quot; and &quot;expression must have integral or unscoped enum type&quot;.</p>
  <pre><code>TCHAR path = L&quot;C:\Users\ttyler\Desktop\Software\Folder2\RUN&quot;;
  TCHAR DestinationPath = L&quot;C:\Users\ttyler\Desktop\Software\Folder2\RUN.zip&quot;;
  system(&quot;Compress-Archive -Path&quot; + path[0] + &quot;-DestinationPath&quot; + DestinationPath[0]);
  </code></pre>
  <p>What am I doing wrong when using the variables in my system call?</p>