Questions tagged [long-long]

The `long long` size modifier was introduced in C++11 and can be used with integral types to select an integer of at least 64 bits.

See cppreference for more information.

131 questions
0
votes
0 answers

Converting graph500 binary to edgelist

I want to convert the binary generated by graph500 to a text format (maybe edgelist). I was using this scriptto do that according to this answer, but I am getting confused by the results and the consequent error delineated below. I created a…
Hit
  • 239
  • 2
  • 5
0
votes
1 answer

Not showing the expected output for a certain input

I write the code for this problem. https://codeforces.com/contest/1744/problem/B My code is perfectly working for the input given below, Input: 1 1 1 1 1 1 Output: 2 Input: 1 3 3 1 2 4 0 2 1 3 0 5 Output: 11 14 29 Input: 1 6 7 1 3 2 4 10 48 1…
0
votes
0 answers

This (do-While) loop doesn't want to stop despite meeting the condition - CS50-ps1

What am I doing wrong? it doesn't want to stop. I add printf to many spots to track all the results and they all meet the condition i set for the do-while loop -CS50 #include #include "cs50.h" int main(void) { long long i = 0 ; // we…
0
votes
3 answers

How to combine two numbers to get a long long integer?

I am trying to combine two large numbers together which would result making a "long long int". For example: a = -1716642972; b = 43828807; z = a and b; In this case, I want z to equal -171664297243828807. I know most of you are thinking, "why on…
boblerbob
  • 149
  • 3
  • 9
0
votes
1 answer

C++ calculation of long long with int

below you can find a part of my C++ code of a box class. When I want to calculate the volume for l=1039 b=3749 h=8473 I am expecting 33004122803. Unfortunately I do not understand why only the first implementation (CalculateVolume1) gives the…
0
votes
1 answer

Convert Long Long Int to int64_t in C by Assignment

The following code converts a value of type long long int to a value of type int64_t by assigning a variable of type long long int to a variable of type int64_t. What are potential problems of this way of converting long long int to…
Moritz Wolff
  • 436
  • 1
  • 7
  • 16
0
votes
1 answer

How to Make atoi huge-numbers proof?

hello I'm trying to recreate atoi in with some other added conditions, mainly computing how many signs and returning the number positive if number of minus even , otherwise negative, the script works fine. the problem it should be created with int…
Question
  • 63
  • 7
0
votes
1 answer

How to convert a string to Double with all the numbers after the floating poing?

Lets say i have a string "53.430996", I want to convert it to a string and store all the values after the floating point I tried: #include #include #include #include using namespace std; int main(){ …
Dave Lee
  • 1
  • 2
0
votes
1 answer

Emscripten With Configure Script Says `long long` is Not Available

When using emconfigure to configure ECL for WebAssembly, the configure script reports: checking size of long long... not available checking whether byte ordering is bigendian... no checking appropiate type for fixnums... configure: error: There is…
0
votes
0 answers

When I assign a bigger number to a long long variable, why the variable is 0?

unsigned long long mem_size = 1024 * 1024 * 1024 *1024; Why in vs2013, I find the variable mem_size is not 240 but 0?
Johnson
  • 1
  • 1
0
votes
0 answers

How to solve this Floating Point expection: 8 error

This program is suppose to take a json in the format of a dict. The keys are zipcodes and the values are vectors of rent prices. When i run it using g++ I get a floating point exception 8: error. To my knowledge that error only triggers if the value…
0
votes
1 answer

Cast: functions fun1 and fun2 should the same value but the output is different. Can you explain why is it so?

It seems like the functions fun1 and fun2 should return the same values but the outputs are different. Can you explain why is it so? #include using namespace std; long long fun1(int, int, int ); long long fun2(int, int, int ); int…
0
votes
1 answer

with Strings in c

I try to do interpolation search with the data from the struct. For example I give as input the time 2014-02-13T18:50:00 and I want interpolation search return the temp 4.0 and the hum 75 but something doesn't work. I think the problem appears when…
user1555
  • 23
  • 4
0
votes
1 answer

C++, C2447 '{': missing function header (old-style format list?), win32 and long

I'm getting an error while building a solution on existing code for learning. The preprocessor I have defined is Win32 (as it should) and the code itself is from https://www.nayuki.io/page/bitcoin-cryptography-library. The error seems to be created…
Dnam
  • 21
  • 1
0
votes
2 answers

Print only 7 last numbers from long long int

I have hex value ex. 0300E0678C, i convert it to long long int 12899608460 but on this stage I must print only 7 last numbers from long long int - 9608460, so I try to sprintf with %lld but it returns nothing. Any ideas how to do it? #include…
Sirwiz
  • 15
  • 5
1 2 3
8 9