Code improvement suggestions

This is a discussion on Code improvement suggestions within the C Programming forums, part of the General Programming Boards category; Like I said time to look for a better compiler /ducks...

  1. #16
    & the hat of GPL slaying Thantos's Avatar
    Join Date
    Sep 2001
    Posts
    5,681
    Like I said time to look for a better compiler

    /ducks

  2. #17
    Registered User Xzyx987X's Avatar
    Join Date
    Sep 2003
    Posts
    107
    Originally posted by Monster
    This is not about making it fast, it's about making your program solid. You only initialise the first 4 bytes in the array. This can be very dangerous!
    Not really. The only time it would be a problem is if I forgot to set the default value, or used the wrong size for the type of value, in which case I'd have a bug whether it was initialized or not anyway.
    Originally posted by Salem
    The only reason the compiler is complaining is because they're using a C++ compiler to compile C code.

    Well I think it's C code, there's so much windows'y stuff in there it's hard to tell.
    VC++ defaulting to a file type of .cpp doesn't help matters either.
    Yes, i am using VC++, yes I did make it a .cpp file, and yes I did intend to write my program in pure C. Maybe that's not such a good idea, but I really didn't want to have to give up function overloading.

Page 2 of 2 FirstFirst 12
Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Suggestions on this C style code
    By Joelito in forum C Programming
    Replies: 11
    Last Post: 06-07-2007, 04:22 AM
  2. Proposal: Code colouring
    By Perspective in forum A Brief History of Cprogramming.com
    Replies: 28
    Last Post: 05-14-2007, 08:23 AM
  3. Values changing without reason?
    By subtled in forum C Programming
    Replies: 2
    Last Post: 04-19-2007, 11:20 AM
  4. Updated sound engine code
    By VirtualAce in forum Game Programming
    Replies: 8
    Last Post: 11-18-2004, 12:38 PM
  5. Interface Question
    By smog890 in forum C Programming
    Replies: 11
    Last Post: 06-03-2002, 06:06 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21