title: .txt file shows chinese symbols / c++
body: <p>So I'm writing this program in C++ for school and everything looks ok until I open the .txt file... all I can see are Chinese symbols.. Anyone with an idea?</p>
  
  <p>That's my code. Dont mind the unfinished search function and other stuff.</p>
  
  <pre><code>#include &lt;iostream&gt;
  #include &lt;fstream&gt;
  
  using namespace std;
  
  fstream data_file;
  struct depositor
  {
      char name[20];
      char last_name[30];
      char address[60];
  };
  
  void add_depositor(depositor p_Info);
  void search_depositor();
  
  void add_depositor(depositor p_Info)
  {
      data_file.open("Data.txt", ios::app);
      if (data_file.fail())
      {
          cout &lt;&lt; "Error while opening the file!";
          exit(1);
      }
      else
      {
          data_file.write((char*)(&amp;p_Info), sizeof(depositor));
          data_file.close();
      }
  }
  
  int menu()
  {
      int choice;
      do
      {
          cout &lt;&lt; "\n* Menu *";
          cout &lt;&lt; "\n* 1. Add depositor! *";
          cout &lt;&lt; "\n* 2. Search for depositor! *";
          cout &lt;&lt; "\n* 3. Exit program! *";
          cout &lt;&lt; "\n* Enter your choice: ";
          cin &gt;&gt; choice;
          cout &lt;&lt; "\n* You chose: " &lt;&lt; choice;
      } while (choice &lt; 1 || choice &gt; 4);
      return choice;
  }
  void main()
  {
      depositor p; int choice;
      do
      {
          choice = menu();
          switch (choice)
          {
          case 1: cout &lt;&lt; "\n Enter first name: ";
              cin &gt;&gt; p.name;
              cout &lt;&lt; "\n Enter last name:  ";
              cin &gt;&gt; p.last_name;
              cin.clear();
              cin.ignore(2000, '\n');
              cout &lt;&lt; "\n Enter address: ";
              cin.getline(p.address, 60);
              add_depositor(p); break;
          case 2: cout &lt;&lt; "";
          default: cout &lt;&lt; "\n* End of program! *";
          }
      } while (choice != 4);
  }
  </code></pre>
  
  <p>And this is what I get in the txt file:</p>
  
  <p><img src="https://i.stack.imgur.com/K0y4p.png" alt=""></p>