1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Managed C++ : Int to String representation of Binary

Discussion in 'C++' started by Smithy566, Sep 3, 2010.

  1. Smithy566

    Smithy566 New Member

    Sep 3, 2010
    Likes Received:
    Trophy Points:
    Hi all,

    I'm trying to create a method in managed c++ which will convert an int to a string representation of binary.

    I have done this in C# before, but I can't work out how to do it in Managed C++

    Below is the code from my C# effort that worked.


    // This is C# Code

    public string intToBinary(int convertThis)
    string converted = Convert.ToString(convertThis, 2);
    return converted;


Share This Page