Register Advertise with usHelp Desk Today's Posts Search

Closed Thread
Thread Tools Search this Thread
Unread 21st Sep 2016, 02:29 AM   #1
Warrior Member
 
Join Date: 2016
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default
Maximum char array size
Share on: 
fb share twitter share gplus share more share

Hello I am trying to declare a char array of size of approximately nineteen million of positions and I am receiving a Segmentation fault when running my program. The declaration is the last thing of the program.

So what it is the maximum size I can use?
Should I use dynamic memory allocation? Or maybe a vector?
In this case what is the better option. I know in advance the size of the array, that's why I tried to use one and not a vector.


EDIT: I made I mistake, I only needed an array of 1/8 that size, and it worked just fine with this new size. But for future use, my question is the same. What is it the maximum size, should I use dynamic memory or a vector?
NicoleJS is offline  
Closed Thread


Bookmarks

Tags
array, char, maximum, size


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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




All times are GMT -6. The time now is 04:17 PM.