Thread: Roman Numeral troubles....

  1. #16
    Kernel hacker
    Join Date
    Jul 2007
    Location
    Farncombe, Surrey, England
    Posts
    15,677
    Of course, you could also use const char *r[] = ... and completely avoid the problem of using an array size.

    --
    Mats
    Compilers can produce warnings - make the compiler programmers happy: Use them!
    Please don't PM me for help - and no, I don't do help over instant messengers.

  2. #17
    Registered User
    Join Date
    Jan 2009
    Posts
    15
    I could, except arrays of pointers still confuse me lol, I know how they work, but find it difficult to think about when programming logic with them.
    On the issue of oversizing arrays slightly when declaring them, sometimes that can be an issue, for instance in a program Im doing which returns the max, min, median, mode, ect from a set of data if you make the array too big the extra elements will either contain some trash integer (probably large) which throws the max function out, or if you initialize them all to 0 then it ruins the min function. Leaving the size unspecified is probably a good idea, like iMalc suggested.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. roman numeral conversion
    By clarky101 in forum C Programming
    Replies: 8
    Last Post: 12-09-2007, 07:13 PM
  2. Roman Numeral...T_T
    By only1st in forum C++ Programming
    Replies: 12
    Last Post: 04-12-2007, 10:06 AM
  3. Roman Numeral Convertor
    By mike1000 in forum C Programming
    Replies: 2
    Last Post: 11-24-2005, 02:53 PM
  4. Roman Numeral Calculator
    By The Brain in forum C++ Programming
    Replies: 3
    Last Post: 04-13-2005, 06:23 PM
  5. implicit declatation of function 'int toupper(...)'
    By Intimd8r in forum C Programming
    Replies: 3
    Last Post: 10-01-2001, 02:43 PM