Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.c++ > #6936
| Path | csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!gegeweb.org!de-l.enfer-du-nord.net!feeder1.enfer-du-nord.net!feeder.erje.net!news-1.dfn.de!news.dfn.de!news.informatik.hu-berlin.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail |
|---|---|
| From | Ian Collins <ian-news@hotmail.com> |
| Newsgroups | comp.lang.c++ |
| Subject | Re: HEAP error when trying to use free() help needed |
| Date | Mon, 20 Jun 2011 20:57:30 +1200 |
| Lines | 20 |
| Message-ID | <968gc6FsmeU4@mid.individual.net> (permalink) |
| References | <75366d67-4c83-46cf-a75b-6a953578b6f8@v12g2000vby.googlegroups.com> <445a602a-ca39-4806-88bf-be5820678d7f@gv8g2000vbb.googlegroups.com> <9683f5FsmeU3@mid.individual.net> <7fea560f-f171-4fd7-ad1b-e4d97598b7e8@r2g2000vbj.googlegroups.com> <4dfee374$0$2831$7b1e8fa0@news.nbl.fi> <3a723395-a6b3-4a14-8e70-6b0e9ded7b1e@m18g2000vbl.googlegroups.com> |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=ISO-8859-1; format=flowed |
| Content-Transfer-Encoding | 7bit |
| X-Trace | individual.net NuaCGRCv3ESLx/fHEP9odAkDMLAmARrtGCi/CjT7UuQswubXIL |
| Cancel-Lock | sha1:2NYgJC+AK70HZKpQon3HMGZpnRI= |
| User-Agent | Mozilla/5.0 (X11; U; SunOS i86pc; en-US; rv:1.9.2.9) Gecko/20101021 Lightning/1.0b2 Thunderbird/3.1.4 |
| In-Reply-To | <3a723395-a6b3-4a14-8e70-6b0e9ded7b1e@m18g2000vbl.googlegroups.com> |
| Xref | x330-a1.tempe.blueboxinc.net comp.lang.c++:6936 |
Show key headers only | View raw
On 06/20/11 07:35 PM, none wrote: > On Jun 20, 1:06 am, Juha Nieminen<nos...@thanks.invalid> wrote: >> none<none9...@hotmail.com> wrote: >>> It's just a simplified test of a more complex code that didn't work, >>> I'm using just one char for the purpose of this test, but the final >>> code will handle a string. >> >> Any reason you can't use std::string or std::vector<char>? Using them >> instead of allocating the string yourself will not only make your code >> safer, it will also make it a lot simpler (you won't need to write a >> copy constructor and assignment operator). > > In fact, I made a mistake when I said that the data was a string. The > string will be converted into BCD values, so the data pointer will > contain a arbitrary sized BCD number. But why are you using malloc, or raw pointers? -- Ian Collins
Back to comp.lang.c++ | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
HEAP error when trying to use free() help needed none <none9823@hotmail.com> - 2011-06-07 03:16 -0700
Re: HEAP error when trying to use free() help needed "Fred Zwarts \(KVI\)" <F.Zwarts@KVI.nl> - 2011-06-07 13:11 +0200
Re: HEAP error when trying to use free() help needed "Balog Pal" <pasa@lib.hu> - 2011-06-07 15:18 +0200
Re: HEAP error when trying to use free() help needed "io_x" <a@b.c.invalid> - 2011-06-07 19:50 +0200
Re: HEAP error when trying to use free() help needed "io_x" <a@b.c.invalid> - 2011-06-09 08:48 +0200
Re: HEAP error when trying to use free() help needed "io_x" <a@b.c.invalid> - 2011-06-08 11:11 +0200
Re: HEAP error when trying to use free() help needed Juha Nieminen <nospam@thanks.invalid> - 2011-06-08 10:17 +0000
Re: HEAP error when trying to use free() help needed Mustansir <mustansir.azhar@gmail.com> - 2011-06-08 06:23 -0700
Re: HEAP error when trying to use free() help needed Krice <paulkp@mbnet.fi> - 2011-06-08 11:42 -0700
Re: HEAP error when trying to use free() help needed Pete Becker <pete@versatilecoding.com> - 2011-06-08 08:54 -1000
Re: HEAP error when trying to use free() help needed none <none9823@hotmail.com> - 2011-06-19 22:06 -0700
Re: HEAP error when trying to use free() help needed Ian Collins <ian-news@hotmail.com> - 2011-06-20 17:17 +1200
Re: HEAP error when trying to use free() help needed none <none9823@hotmail.com> - 2011-06-19 22:53 -0700
Re: HEAP error when trying to use free() help needed Juha Nieminen <nospam@thanks.invalid> - 2011-06-20 06:06 +0000
Re: HEAP error when trying to use free() help needed none <none9823@hotmail.com> - 2011-06-20 00:35 -0700
Re: HEAP error when trying to use free() help needed Ian Collins <ian-news@hotmail.com> - 2011-06-20 20:57 +1200
Re: HEAP error when trying to use free() help needed Juha Nieminen <nospam@thanks.invalid> - 2011-06-20 18:25 +0000
csiph-web