title: How to print the current working directory in Unix shell in C++?
body: <p>I am using the <code>chdir()</code> method inside it, so I can't define <code>cwd</code> as a string.</p>
  
  <p>How can I print the current working directory in Unix shell in C++?</p>