incrementing on a specified base

This is a discussion on incrementing on a specified base within the Windows Programming forums, part of the Platform Specific Boards category; how would you add 1 to a number of a non decimal base? for example is their a way to ...

  1. #1
    Registered User canine's Avatar
    Join Date
    Sep 2001
    Posts
    125

    incrementing on a specified base

    how would you add 1 to a number of a non decimal base?
    for example is their a way to make a 3 with a base of 4 to a 10 with a base of four?
    In a perfect world every dog would have a home and every home would have a dog.
    Visit My Web Site, Canine Programming
    I use Win32 API

  2. #2
    Registered User
    Join Date
    Sep 2001
    Posts
    164
    You do exactly the same as you do when you add decimals. Just think about it...
    // Gliptic

  3. #3
    Registered User
    Join Date
    Oct 2001
    Posts
    2,934
    Is your base 4 number stored in a character array?

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Code review
    By Elysia in forum C++ Programming
    Replies: 71
    Last Post: 05-13-2008, 09:42 PM
  2. Base Converter Part 2
    By encyclopedia23 in forum C Programming
    Replies: 2
    Last Post: 12-30-2006, 01:42 PM
  3. Bit Computation Program
    By cisokay in forum C++ Programming
    Replies: 6
    Last Post: 05-13-2005, 09:32 PM
  4. How to change number data from base 256 to base 16?
    By ooosawaddee3 in forum C++ Programming
    Replies: 2
    Last Post: 11-04-2002, 11:19 PM
  5. Virtual Base Class & Constructor :: C++
    By kuphryn in forum C++ Programming
    Replies: 2
    Last Post: 09-13-2002, 03:14 PM

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