c++ : How to ask a file name and print char Array : <p>i am new in c++, i am working on a project, in case 1 i need to ask a file name from a user and if the file name is correct to it should print something like 6x5 character Array. I am totally confused that how to start. any single help will be appreciated.</p>

<pre><code>#include &lt;iostream&gt;
using namespace std;

int main(){
  int x;
  string file;
  int temp;

  cout &lt;&lt; "Welcome to Urban Heat Island Model" &lt;&lt; endl;
  cout &lt;&lt; "What would you like to do? " &lt;&lt; endl;
  cout &lt;&lt; "1. Load land cover file " &lt;&lt; endl;
  cout &lt;&lt; "2. Model Temperature Based on land cover" &lt;&lt; endl;
  cout &lt;&lt; "3. Exit " &lt;&lt; endl;
  cin &gt;&gt; x;
  switch (x){
  case 1:
    cout &lt;&lt; "What is the name of the file to import? " &lt;&lt; endl;

    cin &gt;&gt; file;  

    break;
</code></pre>
