title: Ending dynamic 2d array with blank line (enter)
body: <p>I need to create 2D dynamic array in C with input like that:</p>
  
  <pre><code>3(spacja)21(spacja)11(enter) 
  4(spacja)5(spacja)125(spacja)45(enter) 
  1(spacja)9(spacja)4(enter) 
  (enter)
  </code></pre>
  
  <p>Blank line have to end input, but I can't make it work.</p>
  
  <pre><code>  for (int m = 0;; ++m) {
      a = (float **) realloc(a, (m + 1) * sizeof(*a));
      a[m]=NULL;
      i = 0;
      while ((count = scanf("%f%c", &amp;tmp, &amp;follow)) &gt; 0) {
        if (count == 2 &amp;&amp; (isspace(follow) || follow == '\n')) {
          a[m] = (float*) realloc(a[m], (i + 1) * sizeof(float));
          a[m][i] = tmp;
          i++;
          if (follow == '\n') {
            n[m] = i;
            break;
          }
        } else {
          printf("Wprowadzono bledne dane\n");  // Wrong data has been entered
          EXIT_SUCCESS;
        }
      }
    }
  </code></pre>