title: Create a dynamic number of threads
body: <p>I want to create a number of threads specified by the user. The code I have written for this is:</p>
  
  <pre><code>int nhijos = atoi(argv[1]);
  
  thread = malloc(sizeof(pthread_t)*nhijos);
  
  for (i = 0; i &lt; nhijos; i++){
    if (pthread_create ( &amp;thread[i], NULL, &amp;hilos_hijos, (void*) &amp;info ) != 0){
    perror("Error al crear el hilo. \n");
    exit(EXIT_FAILURE);
  }   
  </code></pre>
  
  <p>Is this correct? </p>