Silkroad Online Forums

A community forum for the free online game Silkroad Online. Discuss Silkroad Online, read up on guides, and build your character and skills.

Faq Search Members Chat  Register Profile Login

All times are UTC




Post new topic Reply to topic  [ 8 posts ] 
Author Message
 Post subject: C++ question
PostPosted: Thu Mar 17, 2011 8:02 pm 
Active Member
User avatar
Offline

Joined: Mar 2008
Posts: 561
Location:
Off Topic
what variable should i use if i want to memorize a big number? like a 30 digits one

unsigned long only memorize 10 digits..

later edit: meh i don't think such thing exist >_>
:(

_________________
COOL SIG


Top
 Profile  
 
 Post subject: Re: C++ question
PostPosted: Thu Mar 17, 2011 8:53 pm 
Senior Member
User avatar
Offline

Joined: Jan 2007
Posts: 4478
Location: Hollandia
use long long. that's 19 digits.

paste me ur code i'll help you

_________________
Image
HejsaN wrote:
cpinney wrote:
download more ram.

Where? Did not find any on google. :soosad:


Top
 Profile  
 
 Post subject: Re: C++ question
PostPosted: Thu Mar 17, 2011 9:02 pm 
Forum God
User avatar
Offline

Joined: Aug 2006
Posts: 8834
Location: Age of Wushu
oh come on, someone doesn't know how to google
it's in the 1st page http://msdn.microsoft.com/en-us/library ... tz(v=vs.80).aspx

_________________
Playing Age of Wushu, dota IMBA


Top
 Profile  
 
 Post subject: Re: C++ question
PostPosted: Thu Mar 17, 2011 9:04 pm 
Active Member
User avatar
Offline

Joined: Mar 2008
Posts: 561
Location:
Off Topic
i need to do %666013 ( this is a prime number ) from a very big number.
that very big number i get it with this formula:
S=S*(v[i]+1)+S;

the vector has like 1'000'000 numbers .. so the number will be quite big.

i think i ll need to find a better method rather than doing all the calculus..


and for nuclearsilo, those are for microsoft visual c++.
it doesn't work for borland c++.. i mean that _int64 won't work :(

_________________
COOL SIG


Top
 Profile  
 
 Post subject: Re: C++ question
PostPosted: Thu Mar 17, 2011 11:34 pm 
Ex-Staff
User avatar
Offline

Joined: Oct 2006
Posts: 4599
Location: Studying Computer Science, Vienna
There are many big integer libraries out there. Notably, I have used BigInt and GMP. The code in BigInt and GMP is designed to be cross-platform, so you shouldn't have problems deploying it in your programming environment.

EDIT:
Borland C++ sucks. Why would anyone still use that?

_________________
Carry your cross, and I'll carry mine.


Top
 Profile  
 
 Post subject: Re: C++ question
PostPosted: Thu Mar 17, 2011 11:58 pm 
Ex-Staff
User avatar
Offline

Joined: Jan 2008
Posts: 2761
Location: /wave
Just do all the calculations in mod (very big number). You will never exceed 6 digits.


Top
 Profile  
 
 Post subject: Re: C++ question
PostPosted: Fri Mar 18, 2011 12:02 am 
Veteran Member
User avatar
Offline

Joined: Oct 2006
Posts: 3728
Location:
Off Topic
Stress wrote:
There are many big integer libraries out there. Notably, I have used BigInt and GMP. The code in BigInt and GMP is designed to be cross-platform, so you shouldn't have problems deploying it in your programming environment.

EDIT:
Borland C++ sucks. Why would anyone still use that?


We used to learn c++ on that in school, DOS mindset. :l

edit: shit, forgot to answer op... just off the top of my head, did you try "extended", or was that just for floating point operations? (I barely had a C in computer sciences class lol)


Top
 Profile  
 
 Post subject: Re: C++ question
PostPosted: Thu Mar 24, 2011 3:40 pm 
Active Member
User avatar
Offline

Joined: Feb 2009
Posts: 958
Location:
Pluto
I've only used Python =/

_________________
LV 88 Nuker

LV 92 Blader

JuelzSantana wrote:
technically speaking all i need is DOT for dull and wheel bind to kill a chinese char but the other stuff just adds salt to the wounds

im telling i never lose to chinese

edit: and if ur the type to throw up a fire wall or ice wall, i just walk away and sit down lol


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 8 posts ] 

All times are UTC


Who is online

Users browsing this forum: Majestic-12 [Bot] and 9 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group