title: C++ Program Not Reading Absolute Path in Visual Studio 2010
body: <p>I have a C++ program not reading an absolute path in Visual Studio. </p>
  
  <p>The following code works on my desktop environment (Windows 7, Visual Studio 2010, 64 bit). 
  However, on my macbook, I am running bootcamp and/or VMware for a Windows 7 64 bit virtual machine that has the exact same Visual Studio 2010. </p>
  
  <p>My attempts at fixing this problem: </p>
  
  <ol>
  <li><p>I made sure that the absolute path is the same on my macbook as it is on the desktop. I further made double sure that I installed the third party library to read my wave file in 
  the same fashion as I did for the desktop twice. </p></li>
  <li><p>I rewrote the program that run on the desktop, reinstalled the library on my macbook. Simpler program works on desktop, but alas, still failed to read absolute path on macbook. </p></li>
  <li><p>I moved the wav file so not to be a path, but in the actual project solution itself. No change. </p></li>
  <li><p>Google. </p></li>
  </ol>
  
  <p>I include the code at the bottom, for your benefit. I used libsndfile library to read a wav file. I may just try to use my very old crappy Windows laptop, but would can't understand what could be going wrong on my macbook VM machine. </p>
  
  <pre><code>// WaveReader.cpp : main project file.
  
  #include "stdafx.h"
  #include &lt;stdlib.h&gt;
  #include &lt;stdio.h&gt;
  #include &lt;sndfile.h&gt;
  
  using namespace System;
  
  int main(array&lt;System::String ^&gt; ^args)
  {
      Console::WriteLine(L"Hello World");
      SNDFILE *sf; 
      SF_INFO info; 
  
      /*Open the wav file. */
      info.format = 0;
      sf = sf_open("C:\\Users\\geekyomega\\gameover.wav",SFM_READ,&amp;info);
      if (sf == NULL)
      {
          printf("Failed to open the file.\n");
          getchar();
          exit(-1);
      }
  </code></pre>
  
  <p>}</p>
  
  <p>My output, when I run this program is</p>
  
  <pre><code>Failed to open the file
  </code></pre>
  
  <p>As always, thank you for reading through this question. I deeply would appreciate any help, assistance, or wisdom any of you would have. Especially if you encountered a similar problem.</p>
  
  <p>Warm Regards, 
  GeekyOmega</p>