Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.c++ > #67620 > unrolled thread
| Started by | Jivanmukta <jivanmukta@poczta.onet.pl> |
|---|---|
| First post | 2019-08-13 16:34 +0200 |
| Last post | 2019-08-26 10:29 -0700 |
| Articles | 4 on this page of 24 — 12 participants |
Back to article view | Back to comp.lang.c++
newbie question: exceptions Jivanmukta <jivanmukta@poczta.onet.pl> - 2019-08-13 16:34 +0200
Re: newbie question: exceptions Jivanmukta <jivanmukta@poczta.onet.pl> - 2019-08-13 16:38 +0200
Re: newbie question: exceptions Bo Persson <bo@bo-persson.se> - 2019-08-13 17:02 +0200
Re: newbie question: exceptions Jivanmukta <jivanmukta@poczta.onet.pl> - 2019-08-14 10:06 +0200
Re: newbie question: exceptions "Alf P. Steinbach" <alf.p.steinbach+usenet@gmail.com> - 2019-08-14 10:25 +0200
Re: newbie question: exceptions James Kuyper <jameskuyper@alumni.caltech.edu> - 2019-08-14 08:41 -0400
Re: newbie question: exceptions "Alf P. Steinbach" <alf.p.steinbach+usenet@gmail.com> - 2019-08-14 19:39 +0200
Re: newbie question: exceptions James Kuyper <jameskuyper@alumni.caltech.edu> - 2019-08-14 19:47 -0400
Re: newbie question: exceptions "Alf P. Steinbach" <alf.p.steinbach+usenet@gmail.com> - 2019-08-15 05:13 +0200
Re: newbie question: exceptions Jorgen Grahn <grahn+nntp@snipabacken.se> - 2019-08-14 10:18 +0000
Re: newbie question: exceptions Öö Tiib <ootiib@hot.ee> - 2019-08-13 08:03 -0700
Re: newbie question: exceptions Tim Rentsch <tr.17687@z991.linuxsc.com> - 2019-08-17 22:07 -0700
Re: newbie question: exceptions Öö Tiib <ootiib@hot.ee> - 2019-08-17 23:18 -0700
Re: newbie question: exceptions Öö Tiib <ootiib@hot.ee> - 2019-08-18 00:05 -0700
Re: newbie question: exceptions Tim Rentsch <tr.17687@z991.linuxsc.com> - 2019-08-18 05:18 -0700
Re: newbie question: exceptions Bonita Montero <Bonita.Montero@gmail.com> - 2019-08-13 17:39 +0200
Re: newbie question: exceptions Szyk Cech <szykcech@spoko.pl> - 2019-08-13 17:01 +0200
Re: newbie question: exceptions Szyk Cech <szykcech@spoko.pl> - 2019-08-13 17:03 +0200
Re: newbie question: exceptions Bonita Montero <Bonita.Montero@gmail.com> - 2019-08-13 17:03 +0200
Re: newbie question: exceptions red floyd <dont.bother@its.invalid> - 2019-08-13 09:33 -0700
Re: newbie question: exceptions Melzzzzz <Melzzzzz@zzzzz.com> - 2019-08-14 00:37 +0000
Re: newbie question: exceptions Rosario19 <Ros@invalid.invalid> - 2019-08-24 08:32 +0200
Re: newbie question: exceptions Melzzzzz <Melzzzzz@zzzzz.com> - 2019-08-24 11:30 +0000
Re: newbie question: exceptions red floyd <dont.bother@its.invalid> - 2019-08-26 10:29 -0700
Page 2 of 2 — ← Prev page 1 [2]
| From | Melzzzzz <Melzzzzz@zzzzz.com> |
|---|---|
| Date | 2019-08-14 00:37 +0000 |
| Message-ID | <lJI4F.12454$t92.1993@fx25.am4> |
| In reply to | #67629 |
On 2019-08-13, red floyd <dont.bother@its.invalid> wrote: > On 8/13/2019 7:34 AM, Jivanmukta wrote: >> I am learning C++ and I have a question: why: >> >> throw exception(); >> >> and not: >> >> throw new exception(); > > Aside from what everyone else has said... > > Because C++ isn't Java. Except if you don't work with MFC ;) > -- press any key to continue or any other to quit... U ničemu ja ne uživam kao u svom statusu INVALIDA -- Zli Zec Na divljem zapadu i nije bilo tako puno nasilja, upravo zato jer su svi bili naoruzani. -- Mladen Gogala
[toc] | [prev] | [next] | [standalone]
| From | Rosario19 <Ros@invalid.invalid> |
|---|---|
| Date | 2019-08-24 08:32 +0200 |
| Message-ID | <g4m1mep06njre2it8l3sk2dib72bdmu3hr@4ax.com> |
| In reply to | #67620 |
On Tue, 13 Aug 2019 16:34:10 +0200, Jivanmukta wrote: >I am learning C++ and I have a question: why: > >throw exception(); > >and not: > >throw new exception(); i am for not use exceptions C++ can have some problems if one doesn't know how/when the memory of the program is dinamically created and free and if one doesn't know how many leak his/her progam has but for remain it seems ok
[toc] | [prev] | [next] | [standalone]
| From | Melzzzzz <Melzzzzz@zzzzz.com> |
|---|---|
| Date | 2019-08-24 11:30 +0000 |
| Message-ID | <Kd98F.58786$jJ4.38229@fx05.am4> |
| In reply to | #67922 |
On 2019-08-24, Rosario19 <Ros@invalid.invalid> wrote: > On Tue, 13 Aug 2019 16:34:10 +0200, Jivanmukta wrote: > >>I am learning C++ and I have a question: why: >> >>throw exception(); >> >>and not: >> >>throw new exception(); > > i am for not use exceptions > > C++ can have some problems > if one doesn't know how/when the memory of the program > is dinamically created and free > and if one doesn't know how many leak his/her progam has > but for remain it seems ok Exceptions does not produce leaks except if you use MFC. -- press any key to continue or any other to quit... U ničemu ja ne uživam kao u svom statusu INVALIDA -- Zli Zec Na divljem zapadu i nije bilo tako puno nasilja, upravo zato jer su svi bili naoruzani. -- Mladen Gogala
[toc] | [prev] | [next] | [standalone]
| From | red floyd <dont.bother@its.invalid> |
|---|---|
| Date | 2019-08-26 10:29 -0700 |
| Message-ID | <qk14u2$ebg$1@redfloyd.dont-email.me> |
| In reply to | #67922 |
On 8/23/2019 11:32 PM, Rosario19 wrote: > On Tue, 13 Aug 2019 16:34:10 +0200, Jivanmukta wrote: > >> I am learning C++ and I have a question: why: >> >> throw exception(); >> >> and not: >> >> throw new exception(); > > i am for not use exceptions > > C++ can have some problems > if one doesn't know how/when the memory of the program > is dinamically created and free > and if one doesn't know how many leak his/her progam has > but for remain it seems ok > If you design your classes properly and use RAII, you will not have leaks. Also, by using the Standard Library, you should be able to avoid using new/delete directly, again, avoiding leaks.
[toc] | [prev] | [standalone]
Page 2 of 2 — ← Prev page 1 [2]
Back to top | Article view | comp.lang.c++
csiph-web