title: How to read data from txt file>
body: <p>I have a little problem with reading data from file. 
  I need to read the name, lastname and phone number.<br>
  But the data is separated by '|'.</p>
  
  <p>file e.g.</p>
  
  <pre><code>Matthew | McConaughey | 684299275
  
  Humphrey | Bogart | 204050673
  
  Mary | Tyler Moore | 503462885
  
  Loretta | Young | 416211713
  </code></pre>
  
  <p>I wrote this function</p>
  
  <pre class="lang-c prettyprint-override"><code>char name[20];
  char lastname[40];
  int number;
  
  while(!feof(plik)){
  int hpl=fscanf(filename, "%s | %s | %d", name, lastname, &amp;number);
  }
  
  </code></pre>
  
  <p>I have problem when in the file are two-member lastname like 'Tyler Moore', then fscanf return 2</p>
  
  <p>I don't know how I can read them </p>
  
  <p>That is possible to use one fscanf() function ?</p>