Solved

CString , std::string Size Limitation

Posted on 2007-04-11
4
1,116 Views
Last Modified: 2013-12-14
I'm having trouble with populating CString and std::string with really large strings.  Roughly, after 200 chars, CString and std::string start to poop out and throw exceptions.

How does one deal with large strings...I really need to have a large string with over 500-1000 characters.

I'm really desperate and need to fix this as soon as possible..please help!!

I'm using Visual Studio C++ 6.0 -- I have to use this compiler, there's no choice.
0
Comment
Question by:lcor
4 Comments
 
LVL 1

Assisted Solution

by:robear7nt
robear7nt earned 150 total points
Comment Utility
I have had no problems with large strings using CStrings. Is it throwing OUT_OF_MEMORY exceptions?
Can you please show us a sniplet of your code that is having problems, so we better understand what is happening?
0
 
LVL 16

Assisted Solution

by:AlexNek
AlexNek earned 150 total points
Comment Utility
I haven't such a problem with CString too. I only want to notice speed problem with 10000 symbols string when you add a symbols dynamically at the string. Then you need to allocate enough space before. It is possible that the problem in an other part of your code.
0
 
LVL 30

Accepted Solution

by:
Axter earned 200 total points
Comment Utility
Both CString and std::string can handle far more then 200 chars.
More then likely, you're getting some type of heap corruption.

Please post your code.
0
 

Author Comment

by:lcor
Comment Utility
I can't post the entire code -- propietary stuff...so, let me investigate further the heap issue.  I know at least that CString should be okay and something else is happenning.  Thanks!
0

Featured Post

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

Preface I don't like visual development tools that are supposed to write a program for me. Even if it is Xcode and I can use Interface Builder. Yes, it is a perfect tool and has helped me a lot, mainly, in the beginning, when my programs were small…
How to install Selenium IDE and loops for quick automated testing. Get Selenium IDE from http://seleniumhq.org (http://seleniumhq.org) Go to that link and select download selenium in the right hand columnThat will then direct you to their downlo…
The viewer will learn how to synchronize PHP projects with a remote server in NetBeans IDE 8.0 for Windows.
The viewer will learn how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now