|
-
May 20th, 2002, 01:38 PM
#1
Thread Starter
Fanatic Member
CString size?
Hi.
Does anyone know the size limit of a CString variable in kb's?
Thanks in advance.
-
May 20th, 2002, 04:54 PM
#2
I don't know, but I think they either use a 32 bit size variable, or a 0-terminated string. In both cases there is basicly nothing to worry about.
-
May 22nd, 2002, 10:54 PM
#3
Hyperactive Member
If you need to put in more data than a CString is capable
of, then you should rethink your design.
Try splitting up the data.
Bababooey
Tatatoothy
Mamamonkey
-
May 23rd, 2002, 02:34 AM
#4
Thread Starter
Fanatic Member
Hummmmmm.....
Originally posted by noble
If you need to put in more data than a CString is capable
of...
That's what I have been trying to find out. How much data a CString can hold. I'm still waiting on a definitive answer, by the way ...
-
May 23rd, 2002, 01:17 PM
#5
Monday Morning Lunatic
Probably about 2 gig (the limit for a program)
Although in practice you're most likely to be limited to about 400/500mb...why do you need THAT much data that you need it all in a continuous pointer (i.e. a CString)?
You need some kind of "chunked" storage, like a deque (STL) or one of the rope classes.
I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
-- Linus Torvalds
-
May 24th, 2002, 10:03 AM
#6
A locally declare CString is limited to less than 1 MB (max stack size - mem needed by all function calls, which is about 1kB in a high-level MFC call).
All the buzzt
 CornedBee
"Writing specifications is like writing a novel. Writing code is like writing poetry."
- Anonymous, published by Raymond Chen
Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.
-
May 24th, 2002, 10:08 AM
#7
Monday Morning Lunatic
Originally posted by CornedBee
A locally declare CString is limited to less than 1 MB (max stack size - mem needed by all function calls, which is about 1kB in a high-level MFC call).
Nope, the strings are always allocated on the heap
I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
-- Linus Torvalds
-
May 24th, 2002, 10:41 AM
#8
uh, right parksie, forgot that.
All the buzzt
 CornedBee
"Writing specifications is like writing a novel. Writing code is like writing poetry."
- Anonymous, published by Raymond Chen
Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.
-
May 29th, 2002, 07:43 PM
#9
Thread Starter
Fanatic Member
Corned Bee and Parksie ...
Thanks for the information. I appreciate it.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|