title: Convert char array to int array c++
body: <p>I`m having problems converting a char array read from file to an int array. Maybe someone can help me. This is my code:</p>
  
  <pre><code>char vectorPatron[67];
  int iPatrones[67];
  archivo = fopen("1_0.txt", "r");
  for(i=0;i&lt;67;i++){
      fscanf(archivo, "%c", &amp;vectorPatron[i]);
      printf("%c",vectorPatron[i]);
  }
  fclose(archivo);
  for(i=0;i&lt;67;i++){
      iPatrones[i] = atoi(&amp;vectorPatron[i]);
      printf("%d",iPatrones[i]);
  }
  </code></pre>