- iOS/Objective-C 元类和类别
- objective-c - -1001 错误,当 NSURLSession 通过 httpproxy 和/etc/hosts
- java - 使用网络类获取 url 地址
- ios - 推送通知中不播放声音
<分区>
我需要创建一个大小为 1000000000 的数组。
#include<iostream>
#include<cstdlib>
#include<math.h>
#include<cmath>
using namespace std;
unsigned long long int arr[1000000000];
int ZofF(long long int n)
{
for(unsigned long long int i=1;i<=1000000000;i++)
{
}
}
int main()
{
return 0;
}
我收到这样的错误:
C:\Users\TARUNM~1\AppData\Local\Temp\cccgeKSu.s Assembler messages: 63 C:\Users\TARUNM~1\AppData\Local\Temp\cccgeKSu.s Error: value of 00000001dcd6504e too large for field of 4 bytes at 000000000000004e 87 C:\Users\TARUNM~1\AppData\Local\Temp\cccgeKSu.s Error: value of 00000001dcd6507e too large for field of 4 bytes at 000000000000007e
有一个解决方案: How to handle an array with size 1,000,000,000 in C++?
我试过将它分成多个数组,我实际上并没有从上面的链接中理解解决方案。这是代码:
#include<iostream>
#include<cstdlib>
#include<math.h>
#include<cmath>
using namespace std;
unsigned long int arr[125000000];
unsigned long int ar2[125000000];
unsigned long int ar3[125000000];
unsigned long int ar4[125000000];
unsigned long int ar5[125000000];
unsigned long int ar6[125000000];
unsigned long int ar7[125000000];
unsigned long int ar8[125000000];
int ZofF(long long int n)
{
for(unsigned long long int i=1;i<=250000000;i++)
{
}
}
int main()
{
return 0;
}
但是这段代码给了我以下错误。
c:\program files (x86)\dev-cpp\mingw64\x86_64-w64-mingw32\lib\crt2.o In function
check_managed_app':
mingw_initltsdrot_force'
357 h:\crossdev\src\mingw-w64-v3-svn\mingw-w64-crt\crt\crtexe.c (.text+0x21): relocation truncated to fit: R_X86_64_PC32 against symboldefined in .bss section in C:\Program Files (x86)\Dev-Cpp\MinGW64\x86_64-w64-mingw32\lib/libmingw32.a(lib64_libmingw32_a-tlssup.o) 358
h:\crossdev\src\mingw-w64-v3-svn\mingw-w64-crt\crt\crtexe.c (.text+0x2b): relocation truncated to fit: R_X86_64_PC32 against symbol `mingw_initltsdyn_force'defined in .bss section in C:\Program Files (x86)\Dev-Cpp\MinGW64\x86_64-w64-mingw32\lib/libmingw32.a(lib64_libmingw32_a-tlssup.o) 359
h:\crossdev\src\mingw-w64-v3-svn\mingw-w64-crt\crt\crtexe.c (.text+0x35): relocation truncated to fit: R_X86_64_PC32 against symbol `mingw_initltssuo_force'defined in .bss section in C:\Program Files (x86)\Dev-Cpp\MinGW64\x86_64-w64-mingw32\lib/libmingw32.a(lib64_libmingw32_a-tlssup.o) 360
h:\crossdev\src\mingw-w64-v3-svn\mingw-w64-crt\crt\crtexe.c (.text+0x3f): relocation truncated to fit: R_X86_64_PC32 against symbol `mingw_initcharmax' defined in.bss section in C:\Program Files (x86)\Dev-Cpp\MinGW64\x86_64-w64-mingw32\lib/libmingw32.a(lib64_libmingw32_a-charmax.o) c:\program files (x86)\dev-cpp\mingw64\x86_64-w64-mingw32\lib\crt2.o In function
pre_c_init':
mingw_app_type' defined in
129<br/>
h:\crossdev\src\mingw-w64-v3-svn\mingw-w64-crt\crt\crtexe.c (.text+0x51): relocation truncated to fit: R_X86_64_PC32 against symbol.bss section in C:\Program Files (x86)\Dev-Cpp\MinGW64\x86_64-w64-mingw32\lib/libmingw32.a(lib64_libmingw32_a-mingw_helpers.o) 135
h:\crossdev\src\mingw-w64-v3-svn\mingw-w64-crt\crt\crtexe.c (.text+0x71): relocation truncated to fit: R_X86_64_PC32 against symbol `_fmode' defined in .bsssection in C:\Program Files (x86)\Dev-Cpp\MinGW64\x86_64-w64-mingw32\lib/libmingw32.a(lib64_libmingw32_a-xtxtmode.o) 133
h:\crossdev\src\mingw-w64-v3-svn\mingw-w64-crt\crt\crtexe.c (.text+0x78): relocation truncated to fit: R_X86_64_PC32 against symbol `__onexitend' defined in COMMONsection in C:\Program Files (x86)\Dev-Cpp\MinGW64\x86_64-w64-mingw32\lib/libmingw32.a(lib64_libmingw32_a-atonexit.o) 133
h:\crossdev\src\mingw-w64-v3-svn\mingw-w64-crt\crt\crtexe.c (.text+0x7f): relocation truncated to fit: R_X86_64_PC32 against symbol `__onexitbegin' defined inCOMMON section in C:\Program Files (x86)\Dev-Cpp\MinGW64\x86_64-w64-mingw32\lib/libmingw32.a(lib64_libmingw32_a-atonexit.o) 135
h:\crossdev\src\mingw-w64-v3-svn\mingw-w64-crt\crt\crtexe.c (.text+0x86): relocation truncated to fit: R_X86_64_PC32 against symbol `__imp__fmode' defined in.idata$5 section in C:\Program Files (x86)\Dev-Cpp\MinGW64\x86_64-w64-mingw32\lib/libmsvcrt.a(dqows00253.o) c:\program files (x86)\dev-cpp\mingw64\x86_64-w64-mingw32\lib\crt2.o In function
pre_cpp_init':
_newmode' defined in .bss
157<br/>
h:\crossdev\src\mingw-w64-v3-svn\mingw-w64-crt\crt\crtexe.c (.text+0x136): relocation truncated to fit: R_X86_64_PC32 against symbolsection in C:\Program Files (x86)\Dev-Cpp\MinGW64\x86_64-w64-mingw32\lib/libmingw32.a(lib64_libmingw32_a-_newmode.o) 162
h:\crossdev\src\mingw-w64-v3-svn\mingw-w64-crt\crt\crtexe.c (.text+0x13d): additional relocation overflows omitted from the output [Error] ld returned 1 exit status
请帮助我理解为什么会发生这种情况以及如何创建大小为 1000000000 的数组。我在 i5 内核和 4Gb RAM 上使用 64 位 Windows 8.1。我必须升级我的硬件吗?
这个问题在这里已经有了答案: standalone parentheses in javascript [duplicate] (5 个答案) 关闭 8 年前。 我在学习JavaScript,有时会
我是mysql新手,我必须减少以下更新查询的执行时间 UPDATE temp_countcalculations, ( SELECT count(*) as insuffcounts,CRP_
def escape_html(s): for (i, o) in (("&","&"),(">", ">"),(" "变成 ">"等。 关于python - 以下 for 循环
if (read(read(cin, data1), data2)) 问题是C++ Primer 5th Edition 的练习。 read 函数定义如下: std::istream &read(st
我想创建两个宏。其中一个将扩展到函数原型(prototype)和函数内容,另一个将扩展到仅函数原型(prototype)。我正在考虑创建以下内容: #ifdef SOME_CONDITION #def
我正在使用 jongo API - org.jongo.MongoCollection 是类。 我有对象 ID 列表并转换为与 ObjectId[] 相同并尝试按如下方式查询 collection.f
有人可以解释以下正则表达式匹配什么吗? ^.*$ 谢谢! 最佳答案 或者整个字符串或者整行,取决于是否multiline mode被使用。 关于java - 以下 ^.*$ 正则表达式匹配什么?,我们
#include void main() { int a,b,c; for(b = c = 10; a = "- FIGURE?, UMKC,XYZHello Folks,TFy!QJ
我的代码段中的以下代码行被 Sonar 检测为问题。 代码段: final int Pending=1; Sonar 问题: Name 'Pending' must matc
Print name of all activities with neither maximum nor minimum number of participants 我尝试了以下查询,但出现错误:
这个问题在这里已经有了答案: What is this practice called in JavaScript? (7 个回答) 关闭8年前。 (function() { //do stuff
根据任务,我们必须通过 foldr 实现 foldl。通过比较函数签名和 foldl 实现,我得到了以下解决方案: myFoldl :: (a -> b -> a) -> a -> [b] -> a
这个问题在这里已经有了答案: Export an es6 default class inline with definition or at end of file? (1 个回答) 关闭 2 年
据我了解,以下是相同的: Person p{}; // Case 1 Person p = {}; // Case 1.5 我注意到 Person p = Person{}; // Case 2 产生
below i have given a javascript code picture `` can any one help me in this code. what do this code.
我想在标题和正文上搜索全文,并在答案计数上进行过滤。 我阅读了elasticsearch documentation for combining filters并构建了此查询。 "query": {
它是流动的 C 代码中的内存泄漏吗? #include int *a; int main() { a = malloc(sizeof(int)*10); return
这两个声明有什么区别: char (*ptr)[N]; 对比 char ptr[][N]; 谢谢。 最佳答案 (1)声明 char (*ptr)[N]; ptr 是指向大小为 N 的字符数组的指针 下
data II = I Int Int deriving (Show) instance II Show where show I a b = show (a+b) showt.hs:3:2: s
我从 clojuredoc 中阅读了关于 condp 的文档。在文档中我找到了以下代码: (condp 一些 [1 2 3 4] #{0 6 7} :>> 公司 #{4 5 9} :>> 十二月 #{
我是一名优秀的程序员,十分优秀!