C Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsProgramming LanguagesC Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old December 27th, 2012, 10:15 AM
zedeneye1 zedeneye1 is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 2012
Posts: 52 zedeneye1 User rank is Lance Corporal (50 - 100 Reputation Level)zedeneye1 User rank is Lance Corporal (50 - 100 Reputation Level)zedeneye1 User rank is Lance Corporal (50 - 100 Reputation Level) 
Time spent in forums: 14 h 36 m 53 sec
Reputation Power: 1
"long long long" too long?

I have a problem that "long long long" is too long for GCC .

I can't use a 64-bit integer in codeblocks?

how do I use a 64-bit integer in codeblocks...? Is it possible??

Reply With Quote
  #2  
Old December 27th, 2012, 10:35 AM
salem's Avatar
salem salem is offline
Contributed User
Click here for more information
 
Join Date: Jun 2005
Posts: 3,840 salem User rank is General 12nd Grade (Above 100000 Reputation Level)salem User rank is General 12nd Grade (Above 100000 Reputation Level)salem User rank is General 12nd Grade (Above 100000 Reputation Level)salem User rank is General 12nd Grade (Above 100000 Reputation Level)salem User rank is General 12nd Grade (Above 100000 Reputation Level)salem User rank is General 12nd Grade (Above 100000 Reputation Level)salem User rank is General 12nd Grade (Above 100000 Reputation Level)salem User rank is General 12nd Grade (Above 100000 Reputation Level)salem User rank is General 12nd Grade (Above 100000 Reputation Level)salem User rank is General 12nd Grade (Above 100000 Reputation Level)salem User rank is General 12nd Grade (Above 100000 Reputation Level)salem User rank is General 12nd Grade (Above 100000 Reputation Level)salem User rank is General 12nd Grade (Above 100000 Reputation Level)salem User rank is General 12nd Grade (Above 100000 Reputation Level)salem User rank is General 12nd Grade (Above 100000 Reputation Level)salem User rank is General 12nd Grade (Above 100000 Reputation Level)  Folding Points: 153 Folding Title: Novice Folder
Time spent in forums: 2 Months 3 Weeks 2 Days 19 h 21 m 53 sec
Reputation Power: 1774
Yes, you can use a long long in code::blocks (with gcc), but if you're on windows, then you need to use the microsoft specific format for long longs.
click me
__________________
If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
If at first you don't succeed, try writing your phone number on the exam paper

Reply With Quote
  #3  
Old December 27th, 2012, 11:21 AM
zedeneye1 zedeneye1 is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 2012
Posts: 52 zedeneye1 User rank is Lance Corporal (50 - 100 Reputation Level)zedeneye1 User rank is Lance Corporal (50 - 100 Reputation Level)zedeneye1 User rank is Lance Corporal (50 - 100 Reputation Level) 
Time spent in forums: 14 h 36 m 53 sec
Reputation Power: 1
Quote:
Originally Posted by salem
Yes, you can use a long long in code::blocks (with gcc), but if you're on windows, then you need to use the microsoft specific format for long longs.
click me


I'm on windows 7 64 bit.
And didn't quite understand what you said about microsoft specific format...looked into the page, couldn't understand it.

I want to use numbers bigger than (+-)2 billion something which is possible with 32bits...

and I am able to use "long long" already. I need "long long long" (3x "long").

Reply With Quote
  #4  
Old December 27th, 2012, 11:42 AM
Scorpions4ever's Avatar
Scorpions4ever Scorpions4ever is offline
Banned ;)
Dev Shed God 9th Plane (9000 - 9499 posts)
 
Join Date: Nov 2001
Location: Woodland Hills, Los Angeles County, California, USA
Posts: 9,390 Scorpions4ever User rank is General 46th Grade (Above 100000 Reputation Level)Scorpions4ever User rank is General 46th Grade (Above 100000 Reputation Level)Scorpions4ever User rank is General 46th Grade (Above 100000 Reputation Level)Scorpions4ever User rank is General 46th Grade (Above 100000 Reputation Level)Scorpions4ever User rank is General 46th Grade (Above 100000 Reputation Level)Scorpions4ever User rank is General 46th Grade (Above 100000 Reputation Level)Scorpions4ever User rank is General 46th Grade (Above 100000 Reputation Level)Scorpions4ever User rank is General 46th Grade (Above 100000 Reputation Level)Scorpions4ever User rank is General 46th Grade (Above 100000 Reputation Level)Scorpions4ever User rank is General 46th Grade (Above 100000 Reputation Level)Scorpions4ever User rank is General 46th Grade (Above 100000 Reputation Level)Scorpions4ever User rank is General 46th Grade (Above 100000 Reputation Level)Scorpions4ever User rank is General 46th Grade (Above 100000 Reputation Level)Scorpions4ever User rank is General 46th Grade (Above 100000 Reputation Level)Scorpions4ever User rank is General 46th Grade (Above 100000 Reputation Level)Scorpions4ever User rank is General 46th Grade (Above 100000 Reputation Level) 
Time spent in forums: 1 Month 4 Weeks 1 Day 22 h 32 m 40 sec
Reputation Power: 4080
There isn't any official type called long long long in C or C++. However there are some multiple precision libraries that let you compute to arbitrary precisions (subject to how much RAM you have in your computer). One such library is GNU MP Bignum library. See if that helps you out or google for "multiple precision library" to see other libraries (MPIR is another one).

Whoops, just noticed you wanted a 64 bit integer. Try #include <stdint.h> and declare your type as u64_t or i64_t for unsigned int or int.
__________________
Up the Irons
What Would Jimi Do? Smash amps. Burn guitar. Take the groupies home.
"Death Before Dishonour, my Friends!!" - Bruce D ickinson, Iron Maiden Aug 20, 2005 @ OzzFest
Down with Sharon Osbourne

Reply With Quote
  #5  
Old December 27th, 2012, 12:15 PM
zedeneye1 zedeneye1 is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 2012
Posts: 52 zedeneye1 User rank is Lance Corporal (50 - 100 Reputation Level)zedeneye1 User rank is Lance Corporal (50 - 100 Reputation Level)zedeneye1 User rank is Lance Corporal (50 - 100 Reputation Level) 
Time spent in forums: 14 h 36 m 53 sec
Reputation Power: 1
Quote:
Originally Posted by Scorpions4ever
There isn't any official type called long long long in C or C++. However there are some multiple precision libraries that let you compute to arbitrary precisions (subject to how much RAM you have in your computer). One such library is GNU MP Bignum library. See if that helps you out or google for "multiple precision library" to see other libraries (MPIR is another one).

Whoops, just noticed you wanted a 64 bit integer. Try #include <stdint.h> and declare your type as u64_t or i64_t for unsigned int or int.


int64_t doesnt work for 19 digit number...

I tested it for all numbers from 20 to 10 digit. 10 digit worked(the number I entered was 1 billion something which is in range of 32bit numbers).

And the triple long or "long long long", I found here :

http://en.wikipedia.org/wiki/Integer_(computer_science)

And codeblocks seems to recognize "long long long" but gives an error that : "long long long is too long for gcc blah blah..."

Reply With Quote
  #6  
Old December 28th, 2012, 01:30 AM
lhon12006 lhon12006 is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2012
Posts: 56 lhon12006 Negative: is most likely a SPAMMER and a traitor to the cause. 
Time spent in forums: 15 h 12 m 50 sec
Reputation Power: 0
try convert it into string ...

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming LanguagesC Programming > "long long long" too long?

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap