BigInt to binary

Dennis Ritchie via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Sat Apr 25 06:13:08 PDT 2015


Hi,
Is there a way to apply a function "format" with BigInt?

-----
import std.stdio, std.bigint, std.string;

void main() {

	BigInt n = -10;

	string s = format("%b", n); // error

	writeln(s);
}


More information about the Digitalmars-d-learn mailing list