Thread: Help a Noob 2 :))

  1. #1
    Registered User
    Join Date
    Jul 2011
    Posts
    8

    Cool Base Number Conversion

    My problem is the same as this one: Making a java base conversion program and i'd like some help? - Yahoo! Answers
    ...the user will input their chosen number, its current base, and the desired base output then program will of course convert it to that and output the number in its new base...
    But the only answer in the link above is in java whereas I'm still unfamiliar with java and I must use C.

    Moreover, is there a general way or principle of converting a number from a certain base number to another base number without having to convert it to decimal? Like directly converting from octal to hexadecimal or from ternary to vigesimal(base 20)?

    Also, is it possible to "download" a .aspx file from a site? Like downloading BaseNumberConversion.aspx from this site:
    Base Number Conversion - Convert Binary, Decimal, Hex, Octal
    ^This does exactly what I need to do. I hope that I could somehow take a peek into its codes.
    I tried viewing the page source but the codes for that program were hidden.

    By the way, I may not use any library besides stdio.h.
    Last edited by jadumonium; 08-20-2011 at 01:56 AM. Reason: library restrictions

  2. #2
    Registered User
    Join Date
    Oct 2008
    Location
    TX
    Posts
    2,059
    Checkout the manpage of the strtol() family.

  3. #3
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,667
    How To Ask Questions The Smart Way
    Before you decide to re-use your topic title for your next thread.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

  4. #4
    Registered User
    Join Date
    Jul 2011
    Posts
    8
    Quote Originally Posted by Salem View Post
    How To Ask Questions The Smart Way
    Before you decide to re-use your topic title for your next thread.
    Aww. Thanks for that. Told you I'm a noob.
    I changed the title, but it won't change on the board.
    Last edited by jadumonium; 08-20-2011 at 01:57 AM.

  5. #5
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,667
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Help a noob. :(
    By jadumonium in forum C Programming
    Replies: 9
    Last Post: 08-19-2011, 07:53 PM
  2. SDL Noob
    By Lesshardtofind in forum Game Programming
    Replies: 2
    Last Post: 07-14-2009, 04:27 PM
  3. NOob KDE
    By noobcpp in forum Linux Programming
    Replies: 1
    Last Post: 10-31-2007, 03:03 PM
  4. help this noob
    By Scarvenger in forum C++ Programming
    Replies: 7
    Last Post: 10-23-2005, 10:05 AM
  5. help me i am noob
    By Scarvenger in forum C++ Programming
    Replies: 7
    Last Post: 10-19-2005, 11:28 AM

Tags for this Thread