24小时热门版块排行榜    

查看: 2142  |  回复: 3

贺仪

铁杆木虫 (著名写手)

[求助] 数组超出限制怎么办?

在我的程序中定义了两个很大的数组,
c(999,3,3,3,200,3)
stt(999,33,999,33)
在编译时提示
CODE:
/tmp/ifortW2WJma.o: In function `MAIN__':
gfilm2.f:(.text+0x427): relocation truncated to fit: R_X86_64_32S against `.bss'
gfilm2.f:(.text+0x448): relocation truncated to fit: R_X86_64_32S against `.bss'
gfilm2.f:(.text+0x4c2): relocation truncated to fit: R_X86_64_32S against `.bss'
gfilm2.f:(.text+0x4e3): relocation truncated to fit: R_X86_64_32S against `.bss'
gfilm2.f:(.text+0x526): relocation truncated to fit: R_X86_64_PC32 against `.bss'
gfilm2.f:(.text+0x52e): relocation truncated to fit: R_X86_64_PC32 against `.bss'
gfilm2.f:(.text+0x53f): relocation truncated to fit: R_X86_64_PC32 against `.bss'
gfilm2.f:(.text+0x546): relocation truncated to fit: R_X86_64_PC32 against `.bss'
gfilm2.f:(.text+0x54d): relocation truncated to fit: R_X86_64_PC32 against `.bss'
gfilm2.f:(.text+0x55a): relocation truncated to fit: R_X86_64_PC32 against `.bss'
gfilm2.f:(.text+0x575): additional relocation overflows omitted from the output

网上说是数组过大,那应该怎么办呢?

[ Last edited by 微尘、梦想 on 2011-10-10 at 19:53 ]
回复此楼
嘟啦啦嘟啦啦嘟
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

snoopyzhao

至尊木虫 (职业作家)

【答案】应助回帖

xzhdty: 欢迎常来程序语言看看 2011-10-10 22:07:11
我觉得你有必要重新考虑你的数据结构,开这么大的多数组,的确不是一个好的想法……
2楼2011-10-10 19:09:01
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

jiayanhui

木虫 (正式写手)

大木虫

【答案】应助回帖

xzhdty: 欢迎常来程序语言看看 2011-10-10 22:06:55
建议将数组存储改为链表格式存储,这样就不收限制了,可以用单向链表、双向链表或环形链表
春天来了
3楼2011-10-10 20:48:13
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

贺仪

铁杆木虫 (著名写手)

jjdg: 感谢分享解决方案 2011-10-11 14:05:58
我动态分配了 可以了
嘟啦啦嘟啦啦嘟
4楼2011-10-11 09:14:53
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖
相关版块跳转 我要订阅楼主 贺仪 的主题更新
信息提示
请填处理意见