Search:

Type: Posts; User: CommonTater

Search: Search took 0.10 seconds.

  1. Now ain't that the truth! If we could do "C...

    Now ain't that the truth!

    If we could do "C with Strings" we'd have to rename it as a new language... C$$ ??
  2. It was only an example to point him in the right...

    It was only an example to point him in the right direction...



    The big reason it doesn't work is the total lack of compiler support for strings.



    I know we can't... but we should be able...
  3. No worries... helping is one of the best ways to...

    No worries... helping is one of the best ways to learn!

    C isn't a baby-sitter language. If you want something to happen, you have to make it happen.
    I'm fond of describing it as a "totally...
  4. All this to avoid using char[20]; (or such) in a...

    All this to avoid using char[20]; (or such) in a struct? Really...
    Watch this...


    // the struct
    typedef struct t_User
    { char Name1[20];
    char Name2[20];
    // whatever else you...
  5. In the case that all you are doing is reassigning...

    In the case that all you are doing is reassigning pointers, yes something like that could be made to work. But you do have to be aware that a process such as that is loaded with pitfalls that may...
  6. Still assigning string literals I see.... Ok,...

    Still assigning string literals I see....

    Ok, something to ponder... Joe has changed his name to John, which you have in NewName[30] and now you need to update that record...
  7. Just so you know snowolfe ... I've just put that...

    Just so you know snowolfe ... I've just put that total idiot Phantomotap in my ignore list.

    I'm going to bow out of this and let you continue with the others.
  8. Do try not to be a complete idiot. I'll take...

    Do try not to be a complete idiot.

    I'll take bets that you've never worked with random access files... not even as a learning experience.

    Tell me one good reason why I should have to write all...
  9. I won't pretend to completely understand at this...

    I won't pretend to completely understand at this point but I think I get the gist of it...

    You may also want to look into a random access file for this as well... They're easy enough to write;...
  10. I said "the struct"... not the data. Writer...

    I said "the struct"... not the data.


    Writer program....


    #include <stdio.h>

    struct t_Test
    { char * name;
  11. ... or assign strings from user input or write...

    ... or assign strings from user input or write the struct to disk.

    Seriously... you don't think he's going to stay with his little test program do you?
    At some point he's going to want to...
  12. Dynamic allocation of the structs --probably in a...

    Dynamic allocation of the structs --probably in a linked list-- is a fairly good way to handle this.

    However; dynamic allocation inside the structs is going to be frought with problems and...
  13. And this is helpful, exactly how?

    And this is helpful, exactly how?
  14. Yep... you're missing 2 things... 1)...

    Yep... you're missing 2 things...

    1) sizeof(passedex) does not return the size of the array, it returns the size of the *pointer* you passed into the function. You just got lucky because the...
Results 1 to 14 of 14