BigInt in C++!!!

Write here if you have problems with your C++ source code

Moderator: Board moderators

Post Reply
ankit.arora
New poster
Posts: 11
Joined: Tue May 22, 2007 10:09 pm
Location: India

BigInt in C++!!!

Post by ankit.arora »

can someone please explain me what is this BIGINT and how can i use it for lengthy integer values...... actually i tried the syntax but there was a stright forward error....... please help!!!!!
Thanks!!!
stubbscroll
Experienced poster
Posts: 151
Joined: Tue Nov 16, 2004 7:23 pm
Location: Norway
Contact:

Post by stubbscroll »

C++ does not have built-in support for big integers. You need to create routines yourself or find routines written by someone else.

I'm curious, what syntax did you try, the one in Java?
ankit.arora
New poster
Posts: 11
Joined: Tue May 22, 2007 10:09 pm
Location: India

Post by ankit.arora »

Thanks for that!!! I got the point now actually i read many times on this forum that there is a need to use bigint..... and by this i thought that like java we have something in c++..... actually i m a newcomer to c++..... so i got error while trying it and than i thought to enquire about that....

but still i m not very much sure about using this concept ..... if u can somehow give me an example reference.... i think i will get it better!!!

Thanks a lot!!!!!
Trying to learn!!!
stubbscroll
Experienced poster
Posts: 151
Joined: Tue Nov 16, 2004 7:23 pm
Location: Norway
Contact:

Post by stubbscroll »

The only example reference I remember off the top of my head is this:

http://www.shygypsy.com/tools/BigInt.cpp

But you could try googling also. Others probably exist.
DD
Experienced poster
Posts: 145
Joined: Thu Aug 14, 2003 8:42 am
Location: Mountain View, California
Contact:

Re: BigInt in C++!!!

Post by DD »

stubbscroll wrote:The only example reference I remember off the top of my head is this:



http://www.shygypsy.com/tools/BigInt.cpp



But you could try googling also. Others probably exist.
WOW, this file ROCKS! Although it said there are still some bugs, but I think it would be a good start if you try to implement your own Bigint library. :D
Have you ever...
  • Wanted to work at best companies?
  • Struggled with interview problems that could be solved in 15 minutes?
  • Wished you could study real-world problems?
If so, you need to read Elements of Programming Interviews.
Post Reply

Return to “C++”