I want to have like 2 000 000 place for my char length but it do not let me ? How can I solve that to have a lots of place ?
Printable View
I want to have like 2 000 000 place for my char length but it do not let me ? How can I solve that to have a lots of place ?
You want a 2 million character string? :eek:
It probably won't let you allocate it on the stack since you only get 1mb by default (from Windows). You can tweak it up with linker options, but it's probably best to use new[] and allocate it on the heap as well.
ok... I do not see any stuff in my book about that. I want to put charactere from a file in a char[]... after I want to compare and replace and add... Do you have any idea with a little piece of code please?Quote:
You can tweak it up with linker options, but it's probably best to use new[] and allocate it on the heap as well.
You want to load an entire file into memory? You're probably best off looking into rope classes... Do a search on Google and you might find something :)
For allocation:...or similar ;)Code:char *buf = new char[2000000];
thx you my friend!