The Life & Times of Josiah Cornett

This blog reveals just a tidbit of me. More than anything else, it's for friends who want to catch up with me or for my own writing pleasure. Also, for your educational pleasure, check out my philosophy corner "JC Speaks." Just click on the link to the right.

Monday, February 27, 2006

My Spring Break has Taken Flight...

I think my Spring Break just sprouted wings and flew out the window.

Yes, I'm still working on that programming assignment. 20+ hours spent and I'm just a couple steps ahead of myself at the time I posted last (at least, I think I am).

grrrRRRRRRRRRR!

4 Comments:

  • At Mon Feb 27, 01:38:00 PM 2006, Blogger Unknown said…

    Does your function have bounds?
    (i.e. only works for arabic numbers >= 0 but less than 9,999)

    If it does, you can create an array of strings for each place value (array for ones, tens, hundreds, etc.). Each array would have 9 entries.

    For instance,
    std::string ones[9] = {"I", "II",..."IV"};

    Then you can use the modulus operator to dismantle the arabic number, mapping each order of magnitude (ones, tens, hundreds) to their respective string representation. Then concat all that together.

    If you don't have bounds...sorry.

     
  • At Mon Feb 27, 01:57:00 PM 2006, Blogger Unknown said…

    typo correction:

    std::string ones[9]= {
    "I", "II", "III", "IV", ... "IX"
    };

     
  • At Mon Feb 27, 06:14:00 PM 2006, Anonymous Anonymous said…

    yeah, I hate it when I realize that my spring break won't be a break at all. It's a very depressing realization.

     
  • At Mon Feb 27, 07:21:00 PM 2006, Anonymous Anonymous said…

    Thanks for the help Paul-Michael... but I haven't gotten that far yet so I think I'll stick to what I feel comfortable with. I'm thinking I'm on the verge of a breakthrough though... olny another 9 or 10 hours and I should be done.

    Ahem... I offer to crown anyone who knows C++ with the crown of my friendship. Special deal for this semester alone. ;)

     

Post a Comment

<< Home