Forum: C++ Jun 5th, 2008 |
| Replies: 2 Views: 750 Looking at your code, it looks like your intention is to simultaneously return a pointer to the
"copied" array and clean up the memory allocated by the old array. Having a function perform that... |
Forum: C++ Jun 5th, 2008 |
| Replies: 7 Views: 1,242 Dreading memory leaks, I would like to make sure I have an understanding of the following code:
//vector initialized to allocate 10 string objects
vector<string> *pvec1 = new... |
Forum: C++ Jun 4th, 2008 |
| Replies: 2 Views: 1,303 Well, for simplicity, we could repeatedly "trim" the string based on its delimiter.
string rTrimString(string thisString, int occurrence, string delimiter) {
for(int i = occurrence - 1; i... |
Forum: C++ Jun 3rd, 2008 |
| Replies: 2 Views: 821 *smacks forehead*
Thanks so much. Migrating from C (char *) to C++ strings had me carelessly forgetting about those pesky null characters, and the debug error didn't help much :P |
Forum: C++ Jun 3rd, 2008 |
| Replies: 2 Views: 821 The following code works fine with "Release" config, but gets this odd "HEAP_CORRUPTION_DETECTED" error when I try to execute in the "Debug" config. I am using visual studio 2005, default settings. ... |
Forum: C++ May 22nd, 2008 |
| Replies: 20 Views: 36,235 Works great! Thanks so much! |