Thread: String, null-termination and/or strlen issue

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #4
    Registered User
    Join Date
    Nov 2010
    Location
    Long Beach, CA
    Posts
    5,909
    It's anduril, not Andreas, but no biggie.

    One other thing, why do you make such heavy use of the comma? You can use it in a for loop if you have two things to initialize or increment. Outside of that, and the obvious function parameter, you should use it sparingly. Put statements on their own line and use a semicolon to separate them. Avoid cramming too much stuff into one line/statement in general. It makes your code much easier to read (i.e. you'll make fewer bugs, and it will be easier for you and us to find and fix them).
    Last edited by anduril462; 07-26-2012 at 03:32 PM.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. string with different strlen's
    By jeanluca in forum C Programming
    Replies: 6
    Last Post: 03-29-2010, 12:05 AM
  2. null termination with str(n)cpy and strlen
    By jeanluca in forum C Programming
    Replies: 9
    Last Post: 06-22-2009, 03:52 PM
  3. Quick Null Termination Question
    By tommyb05 in forum C Programming
    Replies: 9
    Last Post: 06-05-2009, 09:35 AM
  4. Can't save file! [NULL Byte termination]
    By q6z4k in forum Networking/Device Communication
    Replies: 8
    Last Post: 07-13-2005, 04:45 PM
  5. null termination: seemingly unnecessary
    By krygen in forum C++ Programming
    Replies: 7
    Last Post: 11-08-2004, 11:47 PM

Tags for this Thread