How to append 5000times of string in another string.?


This question is an exact duplicate of:


I am not win programmer, so I don't use this classes, but I see you wrote "sometimes it crashes". this makes me guess this is a memory issue. I would therefore try to use something like GetBufferSetLength() before starting the append, and check I did get a valid pointer. (I guess this is like reserve())

Perhaps, this line:

str1 = str1 + "\r\n";

Should be changed to:

str1 = str1 + L"\r\n";

Maybe something strange is happening with the different character widths. Otherwise, I am not sure why this program would crash.

Need Your Help

Android ListView - divider that covers items

android android-listview divider

How to set divider in ListView to partialy cover items above and below?

Android - How to find if device is receiving GSM signals or not?

android gsm phone-state-listener signal-strength

I simply want to check if my device is receiving GSM signals or not. I know about SignalStrength class and its getGsmSignalStrength(). I have worked with PhoneStateListener and onSignalStrengthsCha...