c++ binary to decimal

binary to decimal

Page 1 of 1

2 Replies - 3080 Views - Last Post: 18 July 2008 - 12:58 PM Rate Topic: -----

#1 junjun_pg  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 1
  • Joined: 18-July 08

c++ binary to decimal

Post icon  Posted 18 July 2008 - 01:24 AM

i want to know the codes of c++ binary to decimal
Is This A Good Question/Topic? 0
  • +

Replies To: c++ binary to decimal

#2 gabehabe  Icon User is offline

  • GabehabeSwamp
  • member icon




Reputation: 1385
  • View blog
  • Posts: 10,962
  • Joined: 06-February 08

Re: c++ binary to decimal

Posted 18 July 2008 - 02:53 AM

*sigh*

[rules][/rules]
Was This Post Helpful? 0
  • +
  • -

#3 F!st!cuffs  Icon User is offline

  • D.I.C Head

Reputation: 12
  • View blog
  • Posts: 153
  • Joined: 15-July 08

Re: c++ binary to decimal

Posted 18 July 2008 - 12:58 PM

View Postjunjun_pg, on 18 Jul, 2008 - 01:24 AM, said:

i want to know the codes of c++ binary to decimal




int main()
{
    bin binaryNum = 01101001;
    dec decimalNum = binToDec( binaryNum );
    
    return 0;
}



Try that and if it doesn't work go to google and do a search for how to convert binary to decimal.

View Postgabehabe, on 18 Jul, 2008 - 02:53 AM, said:

*sigh*

Was This Post Helpful? 0
  • +
  • -

Page 1 of 1