How many characters can an STL string class contain?

I need to work with a number of characters. The number of characters can be up to 10 11 . In a regular array, this is not possible. What should i use? I wanted to use the gets () function to store the string. But is this possible for STL containers? If not, how?

Example: input: AMIRAHID output: AMIRAHID

How to make this possible if the number of characters reduced to 10 ^ 10 in a 32-bit machine?

Thanks in advance.

+5
source share
7 answers

, 100GByte . , . , STXXL, STL, .

+6

. 32- . STL, , , .

+2

, , .

10 11 100 , , 64- ( ), .

STL max_size(), .

+2

10 11 == 93 , , , 64- , string . .

: . , .

, . , EOF . , , .

-.

+2

, : * .

10 ^ 11 4 . 32- 4 . , 64-, ( /.

+1

SGI- STL ROPE ( - , ).

, , . http://www.sgi.com/tech/stl/Rope.html

+1

If everything you are trying to do is read in some kind of massive file and writes to the other file the same data with periods alternating between each character, why do you need to immediately read all this into memory? Select some reasonable buffer size and do it in chunks.

0
source

All Articles