Roman Numeral troubles....

This is a discussion on Roman Numeral troubles.... within the C Programming forums, part of the General Programming Boards category; Of course, you could also use const char *r[] = ... and completely avoid the problem of using an array ...

  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.

Page 2 of 2 FirstFirst 12
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, 11: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, 07:23 PM
  5. implicit declatation of function 'int toupper(...)'
    By Intimd8r in forum C Programming
    Replies: 3
    Last Post: 10-01-2001, 03:43 PM

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