Search:

Type: Posts; User: Lie Algebra

Search: Search took 0.01 seconds.

  1. Replies
    5
    Views
    11,806

    In the code I posted, the statement is...

    In the code I posted, the statement

    is erroneous since length already takes into account the null character that
    ends-up the string.
    The correct statement to use is
  2. Replies
    5
    Views
    11,806

    a possible solution

    In a word here is what I did:

    build a single string from the input file, parse the string and allocate dynamically an array of struct...
    I checked with valgrind for any possible memory leak and...
Results 1 to 2 of 2