抛出'std :: bad_alloc'的实例后调用terminate():St9bad_all [英] terminate called after throwing an instance of 'std::bad_alloc' what(): St9bad_all

查看:112
本文介绍了抛出'std :: bad_alloc'的实例后调用terminate():St9bad_all的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好!


i有一个有趣的问题...希望你的帮助。

我在C编码。

代码发布如下:

这里我有一个带有两个字符向量的结构。

我有字符。在它们中取决于文本文件。其中每个都有76,000个字符一个接一个......但是我无法这样做......程序运行正常,因为小数据...但是这些76,000个字符一个接一个地推入每个向量运行时出现以下错误

====================

在抛出''实例后终止调用std :: bad_alloc''

what():St9bad_alloc

aborted

============== =========

我的RAM用完了..问题是什么???

请帮忙吧!!! />

删除了代码,请阅读发布指南

解决方案

为什么我的代码被删除???

代码在这里::::请不要删除这个时间,如果你继续删除没有人能够看到它...谢谢;;;;;;;;;,

展开 <跨度类= codeDivider > | <跨度类= codeLink的onclick = 全选(本);>选择 <跨度类= codeDivider> | <跨度类= codeLink 的onclick = 自动换行(在此);>裹 <跨度类= codeDivider> | 行号



代码在这里::::请不要删除这一次,如果你继续删除没有人能够看到它



如果你读了发布指南在原来的编辑您的帖子建议你就知道为什么你的代码状态越来越删除


Hi everyone !!

i have an interesting problem...hope you people can help.
I am coding in C.
the code is posted below:
here I have a structure with two character vectors.
I have to characters. in them depending on a text file. Arround 76,000 characters in each of them one after the other....But i am not able to do so...the program runs fine for small data...but with these 76,000 characters pushed in each vector one after the other causes the following error while runing
====================
terminate called after throwing an instance of ''std::bad_alloc''
what(): St9bad_alloc
Aborted
=======================
am I running out of RAM .. what is the problem???
please help it is urgent!!!

Code removed, please read the posting guidelines

解决方案

why was my code removed???


The code is here::::Please do not remove this time it is urgen if you keep removing nobody will be able to see it ...thanks;;;;;;;;;,

Expand|Select|Wrap|Line Numbers


The code is here::::Please do not remove this time it is urgen if you keep removing nobody will be able to see it

And if you read the posting guidelines as suggested in the original edit to your post you would know why your code keeps getting removed.


这篇关于抛出'std :: bad_alloc'的实例后调用terminate():St9bad_all的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆