Search:

Type: Posts; User: MacFromOK

Search: Search took 0.00 seconds.

  1. Replies
    14
    Views
    4,347

    OK, I'm really glad to learn this - I've been...

    OK, I'm really glad to learn this - I've been operating under the assumption that an array of [20] would hold 20 chars plus null, and it has worked with no problem in my Borland (and some other DOS)...
  2. Replies
    14
    Views
    4,347

    Uh... I beg to differ - with most compilers the...

    Uh... I beg to differ - with most compilers the chars are in positions 0-19 (which is 20 chars) and that leaves pos 20 for the null. Not sure why this compiler requires one extra, Borland's...
  3. Replies
    3
    Views
    1,835

    Well, I may or may not be considered qualified to...

    Well, I may or may not be considered qualified to reply on this since I program mostly in straight C and have never used MFC...

    If you are just starting out though, why not use static (text)...
  4. Replies
    14
    Views
    4,347

    Actually I usually malloc/realloc +2 bytes to...

    Actually I usually malloc/realloc +2 bytes to cover possible string manipulation errors on my part. One extra byte is cheap insurance. ;)


    I understand that - my point was that it did not seem to...
  5. Replies
    14
    Views
    4,347

    Actually most of the time there will prolly be...

    Actually most of the time there will prolly be fewer than 100 lines. But the potential is there for a few thousand lines on large apps, so I agree - it's a prolly good idea to use blocks of 10 or so...
  6. Replies
    14
    Views
    4,347

    Ah this is perfect. :D I just realloc the...

    Ah this is perfect. :D

    I just realloc the primary pointer (number of elements) of the **variable as each line loads, and then malloc that element for line length. Thanks.

    BTW the project is...
  7. Replies
    14
    Views
    4,347

    OK, after several more hours of searching (lol,...

    OK, after several more hours of searching (lol, and no sleep since my original post)...

    I seem to have found one possible solution (a double pointer) in an obscure post about matrix multipliers...
  8. Replies
    14
    Views
    4,347

    Dynamic pointer array in C

    Hi Guys,

    My compiler is LCC (a C compiler).

    I am currently using a large (global) array of pointers to load a text file (in a function) as follows:

    1. Using a 64k local UCHAR var to hold a...
Results 1 to 8 of 8