CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com

Search:

Type: Posts; User: TLEJ

Search: Search took 0.01 seconds.

  1. Fixed

    Fixed
  2. Replies
    23
    Views
    3,971

    Re: Very simple C++ question.. (Binary > Decimal)

    Exactly; that's what I mean by useless. The assigned program is useless for any binary with more than 19 digits. The way you are wanting to do it would be useful.
  3. Replies
    23
    Views
    3,971

    Re: Very simple C++ question.. (Binary > Decimal)

    You're right, this forum doesn't seem to have them, haha..
  4. Replies
    23
    Views
    3,971

    Re: Very simple C++ question.. (Binary > Decimal)

    The only length restriction is the limit of the int value. If you want to see how I did it, shoot me a PM. Yeah, I see what you are saying though. It's a pretty useless program, but whatever.
  5. Replies
    23
    Views
    3,971

    Re: Very simple C++ question.. (Binary > Decimal)

    You're misinterpreting what I and clemsonfight are asking. We are not looking for a specific function. It's purely a logical test with your mind. All it is was 3 lines of math functions in a loop....
  6. Replies
    23
    Views
    3,971

    Re: Very simple C++ question.. (Binary > Decimal)

    Well what you've got to do is exactly what you think.. Basically, divide the binary by 10, get the remainder, times it by the position (Which would be the.. (1,2,4,8,16,...) (Which is a variable that...
  7. Replies
    23
    Views
    3,971

    Re: Very simple C++ question.. (Binary > Decimal)

    Yes, we probably are considering your name has Clemson in it! (TCTC?)

    Yeah, this is stupid hence we're not allowed to use any new functions or arrays for that matter..

    I'm completely stumped.....
  8. Replies
    23
    Views
    3,971

    Re: Very simple C++ question.. (Binary > Decimal)

    I DON'T want you guys to do this for me!... I just need to know HOW to do it. It's difficult taking a DECIMAL input, and treating it like it's BINARY. Then CONVERTING it to decimal.

    I'm not...
  9. Replies
    23
    Views
    3,971

    Re: Very simple C++ question.. (Binary > Decimal)

    I can only use what I've learned so far. NO new functions. ONLY the ones I listed in the first post.
  10. Replies
    23
    Views
    3,971

    Re: Very simple C++ question.. (Binary > Decimal)

    How would I do that? I am brand new to c++.. Can you type some code where I have the question marks to show me what you mean?
  11. Replies
    23
    Views
    3,971

    Re: Very simple C++ question.. (Binary > Decimal)

    Sorry for the double post, (Don't know how to edit) but, here's what I have so far: (AND YES, it HAS to be in THIS format..)



    #include "stdafx.h"


    int _tmain(int argc, _TCHAR* argv[])
    {...
  12. Replies
    23
    Views
    3,971

    Re: Very simple C++ question.. (Binary > Decimal)

    I just meant I know how to convert any binary to decimal on paper... Not with arrays... not like a flow chart, just math, lol.

    101(binary) = (1*4)+(0*2)+(1*1) = 5(decimal)
  13. Replies
    23
    Views
    3,971

    Very simple C++ question.. (Binary > Decimal)

    So I need to write a simple program that takes the user input (int) (Which will be in binary) , and outputs the decimal equivalent.

    All we have learned so far is printf, scanf_s, if, do, while,...
Results 1 to 13 of 13





Click Here to Expand Forum to Full Width

Featured