Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.c++ > #2801 > unrolled thread

Re: delete[] p or delete[] *p

Started byGoran <goran.pusic@gmail.com>
First post2011-03-29 10:27 -0700
Last post2011-03-31 23:08 +0000
Articles 20 on this page of 196 — 15 participants

Back to article view | Back to comp.lang.c++

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: delete[] p or delete[] *p Goran <goran.pusic@gmail.com> - 2011-03-29 10:27 -0700
    Re: delete[] p or delete[] *p "Paul" <pchristor@yahoo.co.uk> - 2011-03-29 23:32 +0100
      Re: delete[] p or delete[] *p Kai-Uwe Bux <jkherciueh@gmx.net> - 2011-03-30 01:53 +0200
        Re: delete[] p or delete[] *p "Paul" <pchristor@yahoo.co.uk> - 2011-03-30 03:55 +0100
          Re: delete[] p or delete[] *p Kai-Uwe Bux <jkherciueh@gmx.net> - 2011-03-30 09:52 +0200
            Re: delete[] p or delete[] *p "Paul" <pchristor@yahoo.co.uk> - 2011-03-30 11:44 +0100
              Re: delete[] p or delete[] *p Kai-Uwe Bux <jkherciueh@gmx.net> - 2011-03-30 19:44 +0200
                Re: delete[] p or delete[] *p "Paul" <pchristor@yahoo.co.uk> - 2011-03-30 20:18 +0100
          Re: delete[] p or delete[] *p cg_chas <cg_chas@hotmail.com> - 2011-03-30 04:30 -0400
          Re: delete[] p or delete[] *p Kai-Uwe Bux <jkherciueh@gmx.net> - 2011-03-30 10:33 +0200
            Re: delete[] p or delete[] *p "Paul" <pchristor@yahoo.co.uk> - 2011-03-30 11:39 +0100
            Re: delete[] p or delete[] *p "Paul" <pchristor@yahoo.co.uk> - 2011-03-30 15:38 +0100
              Re: delete[] p or delete[] *p Leigh Johnston <leigh@i42.co.uk> - 2011-03-30 16:14 +0100
                Re: delete[] p or delete[] *p "Paul" <pchristor@yahoo.co.uk> - 2011-03-30 18:06 +0100
                  Re: delete[] p or delete[] *p Leigh Johnston <leigh@i42.co.uk> - 2011-03-30 18:15 +0100
                    Re: delete[] p or delete[] *p "Paul" <pchristor@yahoo.co.uk> - 2011-03-30 18:22 +0100
                      Re: delete[] p or delete[] *p Leigh Johnston <leigh@i42.co.uk> - 2011-03-30 18:38 +0100
                        Re: delete[] p or delete[] *p "Paul" <pchristor@yahoo.co.uk> - 2011-03-31 00:42 +0100
                          Re: delete[] p or delete[] *p Leigh Johnston <leigh@i42.co.uk> - 2011-03-31 00:52 +0100
                            Re: delete[] p or delete[] *p "Paul" <pchristor@yahoo.co.uk> - 2011-03-31 02:22 +0100
                              Re: delete[] p or delete[] *p Goran <goran.pusic@gmail.com> - 2011-03-30 23:44 -0700
                                Re: delete[] p or delete[] *p "Paul" <pchristor@yahoo.co.uk> - 2011-03-31 10:52 +0100
                                  Re: delete[] p or delete[] *p cg_chas <cg_chas@hotmail.com> - 2011-03-31 06:13 -0400
                                  Re: delete[] p or delete[] *p Goran <goran.pusic@gmail.com> - 2011-03-31 04:00 -0700
                                    Re: delete[] p or delete[] *p "Paul" <pchristor@yahoo.co.uk> - 2011-03-31 14:14 +0100
                                      Re: delete[] p or delete[] *p Goran <goran.pusic@gmail.com> - 2011-03-31 07:01 -0700
                                        Re: delete[] p or delete[] *p "Paul" <pchristor@yahoo.co.uk> - 2011-03-31 15:55 +0100
                                          Re: delete[] p or delete[] *p Goran <goran.pusic@gmail.com> - 2011-03-31 08:10 -0700
                                            Re: delete[] p or delete[] *p "Paul" <pchristor@yahoo.co.uk> - 2011-03-31 18:20 +0100
                                              Re: delete[] p or delete[] *p Goran <goran.pusic@gmail.com> - 2011-04-01 01:14 -0700
                                                Re: delete[] p or delete[] *p "Paul" <pchristor@yahoo.co.uk> - 2011-04-01 11:53 +0100
                                                  Re: delete[] p or delete[] *p Goran <goran.pusic@gmail.com> - 2011-04-01 05:11 -0700
                                                    Re: delete[] p or delete[] *p "Paul" <pchristor@yahoo.co.uk> - 2011-04-01 15:32 +0100
                                                      Re: delete[] p or delete[] *p Goran <goran.pusic@gmail.com> - 2011-04-01 11:24 -0700
                                                        Re: delete[] p or delete[] *p "Paul" <pchristor@yahoo.co.uk> - 2011-04-02 01:55 +0100
                                                          Re: delete[] p or delete[] *p Goran <goran.pusic@gmail.com> - 2011-04-02 23:32 -0700
                                                            Re: delete[] p or delete[] *p "Paul" <pchristor@yahoo.co.uk> - 2011-04-03 13:21 +0100
                                                              Re: delete[] p or delete[] *p Goran <goran.pusic@gmail.com> - 2011-04-04 02:47 -0700
                                                                Re: delete[] p or delete[] *p "Paul" <pchristor@yahoo.co.uk> - 2011-04-04 13:33 +0100
                                                                  Re: delete[] p or delete[] *p Goran <goran.pusic@gmail.com> - 2011-04-04 11:06 -0700
                                                                    Re: delete[] p or delete[] *p "Paul" <pchristor@yahoo.co.uk> - 2011-04-04 20:17 +0100
                                                                      Re: delete[] p or delete[] *p Goran <goran.pusic@gmail.com> - 2011-04-05 05:00 -0700
                                                                        Re: delete[] p or delete[] *p "Paul" <pchristor@yahoo.co.uk> - 2011-04-05 15:59 +0100
                                                                          Re: delete[] p or delete[] *p Goran <goran.pusic@gmail.com> - 2011-04-06 03:08 -0700
                                                                            Re: delete[] p or delete[] *p "Paul" <pchristor@yahoo.co.uk> - 2011-04-06 16:24 +0100
                                                                              Re: delete[] p or delete[] *p boltar2003@boltar.world - 2011-04-06 15:36 +0000
                                                                              Re: delete[] p or delete[] *p Goran <goran.pusic@gmail.com> - 2011-04-06 10:23 -0700
                                                                                Re: delete[] p or delete[] *p "Paul" <pchristor@yahoo.co.uk> - 2011-04-06 18:53 +0100
                                                                                  Re: delete[] p or delete[] *p Leigh Johnston <leigh@i42.co.uk> - 2011-04-06 19:01 +0100
                                                                                    Re: delete[] p or delete[] *p "Paul" <pchristor@yahoo.co.uk> - 2011-04-06 19:24 +0100
                                                                                      Re: delete[] p or delete[] *p Leigh Johnston <leigh@i42.co.uk> - 2011-04-06 19:30 +0100
                                                                                  Re: delete[] p or delete[] *p Goran <goran.pusic@gmail.com> - 2011-04-06 11:53 -0700
                                                                                    Re: delete[] p or delete[] *p cg_chas <cg_chas@hotmail.com> - 2011-04-06 17:31 -0400
                                                                                      Re: delete[] p or delete[] *p Ian Collins <ian-news@hotmail.com> - 2011-04-07 09:47 +1200
                                                                                      Re: delete[] p or delete[] *p Joshua Maurice <joshuamaurice@gmail.com> - 2011-04-06 15:14 -0700
                                                                                        Re: delete[] p or delete[] *p Joshua Maurice <joshuamaurice@gmail.com> - 2011-04-06 15:15 -0700
                                                                                    Re: delete[] p or delete[] *p "Paul" <pchristor@yahoo.co.uk> - 2011-04-06 23:13 +0100
                                                                                      Re: delete[] p or delete[] *p Goran <goran.pusic@gmail.com> - 2011-04-06 23:35 -0700
                                                                                        Re: delete[] p or delete[] *p "Paul" <pchristor@yahoo.co.uk> - 2011-04-07 14:20 +0100
                                                                                          Re: delete[] p or delete[] *p Goran <goran.pusic@gmail.com> - 2011-04-07 12:56 -0700
                                                                                            Re: delete[] p or delete[] *p "Paul" <pchristor@yahoo.co.uk> - 2011-04-07 21:47 +0100
                                                                                              Re: delete[] p or delete[] *p Lasse Reichstein Nielsen <lrn.unread@gmail.com> - 2011-04-08 06:54 +0200
                                                                                                Re: delete[] p or delete[] *p "Paul" <pchristor@yahoo.co.uk> - 2011-04-08 08:45 +0100
                                                                                                  Re: delete[] p or delete[] *p Lasse Reichstein Nielsen <lrn.unread@gmail.com> - 2011-04-08 18:01 +0200
                                                                                                    Re: delete[] p or delete[] *p "Paul" <pchristor@yahoo.co.uk> - 2011-04-08 18:09 +0100
                                                                                                      Re: delete[] p or delete[] *p Peter Remmers <p.remmers@expires-2011-04-30.arcornews.de> - 2011-04-08 20:25 +0200
                                                                                                        Re: delete[] p or delete[] *p "Paul" <pchristor@yahoo.co.uk> - 2011-04-08 19:45 +0100
                                                                                                          Re: delete[] p or delete[] *p Peter Remmers <p.remmers@expires-2011-04-30.arcornews.de> - 2011-04-08 21:14 +0200
                                                                                                            Re: delete[] p or delete[] *p "Paul" <pchristor@yahoo.co.uk> - 2011-04-08 21:08 +0100
                                                                                                              Re: delete[] p or delete[] *p Peter Remmers <p.remmers@expires-2011-04-30.arcornews.de> - 2011-04-08 22:52 +0200
                                                                                              Re: delete[] p or delete[] *p Goran <goran.pusic@gmail.com> - 2011-04-08 00:52 -0700
                                                                                                Re: delete[] p or delete[] *p "Paul" <pchristor@yahoo.co.uk> - 2011-04-08 09:06 +0100
                                                                                                  Re: delete[] p or delete[] *p Goran <goran.pusic@gmail.com> - 2011-04-08 07:53 -0700
                                                                                                    Re: delete[] p or delete[] *p "Paul" <pchristor@yahoo.co.uk> - 2011-04-08 18:12 +0100
                                                                                                      Re: delete[] p or delete[] *p Leigh Johnston <leigh@i42.co.uk> - 2011-04-08 18:22 +0100
                                                                                                        Re: delete[] p or delete[] *p "Paul" <pchristor@yahoo.co.uk> - 2011-04-08 19:51 +0100
                                                                                                          Re: delete[] p or delete[] *p Leigh Johnston <leigh@i42.co.uk> - 2011-04-08 19:54 +0100
                                                                                                            Re: delete[] p or delete[] *p "Paul" <pchristor@yahoo.co.uk> - 2011-04-08 21:10 +0100
                                                                                                      Re: delete[] p or delete[] *p Goran <goran.pusic@gmail.com> - 2011-04-10 23:44 -0700
                                                                                                        Re: delete[] p or delete[] *p "Paul" <pchristor@yahoo.co.uk> - 2011-04-11 12:40 +0100
                                                                                                          Re: delete[] p or delete[] *p Goran <goran.pusic@gmail.com> - 2011-04-11 04:53 -0700
                                                                                                            Re: delete[] p or delete[] *p "Paul" <pchristor@yahoo.co.uk> - 2011-04-11 14:05 +0100
                                                                                                              Re: delete[] p or delete[] *p gwowen <gwowen@gmail.com> - 2011-04-11 06:20 -0700
                                                                                                              Re: delete[] p or delete[] *p Goran Pusic <goranp@cse-semaphore.com> - 2011-04-11 07:33 -0700
                                                                                                                Re: delete[] p or delete[] *p cg_chas <cg_chas@hotmail.com> - 2011-04-11 11:42 -0400
                                                                                                                Re: delete[] p or delete[] *p "Paul" <pchristor@yahoo.co.uk> - 2011-04-11 17:56 +0100
                                                                                                                  Re: delete[] p or delete[] *p cg_chas <cg_chas@hotmail.com> - 2011-04-11 13:16 -0400
                                                                                                                    Re: delete[] p or delete[] *p Ian Collins <ian-news@hotmail.com> - 2011-04-12 08:09 +1200
                                                                                                                  Re: delete[] p or delete[] *p Goran <goran.pusic@gmail.com> - 2011-04-12 00:19 -0700
                                                                                                                    Re: delete[] p or delete[] *p SG <s.gesemann@gmail.com> - 2011-04-12 04:04 -0700
                                                                                                                      Re: delete[] p or delete[] *p "Paul" <pchristor@yahoo.co.uk> - 2011-04-12 13:49 +0100
                                                                                                                    Re: delete[] p or delete[] *p "Paul" <pchristor@yahoo.co.uk> - 2011-04-12 13:41 +0100
                                                                                                                      Re: delete[] p or delete[] *p Goran <goran.pusic@gmail.com> - 2011-04-12 06:48 -0700
                                                                                                                        Re: delete[] p or delete[] *p "Paul" <pchristor@yahoo.co.uk> - 2011-04-12 17:20 +0100
                                                                                                                          Re: delete[] p or delete[] *p Goran <goran.pusic@gmail.com> - 2011-04-12 23:43 -0700
                                                                                                                            Re: delete[] p or delete[] *p "Paul" <pchristor@yahoo.co.uk> - 2011-04-13 11:24 +0100
                                                                                                                              Re: delete[] p or delete[] *p cg_chas <cg_chas@hotmail.com> - 2011-04-13 07:13 -0400
                                                                                                                                Re: delete[] p or delete[] *p cg_chas <cg_chas@hotmail.com> - 2011-04-13 07:19 -0400
                                                                                                                          Re: delete[] p or delete[] *p Goran <goran.pusic@gmail.com> - 2011-04-13 08:31 -0700
                                                                                                                          Re: delete[] p or delete[] *p Goran <goran.pusic@gmail.com> - 2011-04-13 23:30 -0700
                                                                                                                            Re: delete[] p or delete[] *p "Paul" <pchristor@yahoo.co.uk> - 2011-04-14 13:50 +0100
                                                                                                                              Re: delete[] p or delete[] *p Goran <goran.pusic@gmail.com> - 2011-04-14 07:28 -0700
                                                                                                                                Re: delete[] p or delete[] *p "Paul" <pchristor@yahoo.co.uk> - 2011-04-14 16:26 +0100
                                                                                                                                  Re: delete[] p or delete[] *p Leigh Johnston <leigh@i42.co.uk> - 2011-04-14 18:02 +0100
                                                                                                                                    Re: delete[] p or delete[] *p "Paul" <pchristor@yahoo.co.uk> - 2011-04-14 19:08 +0100
                                                                                                                                      Re: delete[] p or delete[] *p Leigh Johnston <leigh@i42.co.uk> - 2011-04-14 19:45 +0100
                                                                                                                                        Re: delete[] p or delete[] *p "Paul" <pchristor@yahoo.co.uk> - 2011-04-14 20:55 +0100
                                                                                                                                          Re: delete[] p or delete[] *p Leigh Johnston <leigh@i42.co.uk> - 2011-04-14 21:10 +0100
                                                                                                                                            Re: delete[] p or delete[] *p "Paul" <pchristor@yahoo.co.uk> - 2011-04-14 23:04 +0100
                                                                                                                                              Re: delete[] p or delete[] *p Leigh Johnston <leigh@i42.co.uk> - 2011-04-14 23:24 +0100
                                                                                                                                                Re: delete[] p or delete[] *p Leigh Johnston <leigh@i42.co.uk> - 2011-04-14 23:31 +0100
                                                                                                                                                  Re: delete[] p or delete[] *p Leigh Johnston <leigh@i42.co.uk> - 2011-04-14 23:33 +0100
                                                                                                                                                Re: delete[] p or delete[] *p "Paul" <pchristor@yahoo.co.uk> - 2011-04-15 01:28 +0100
                                                                                                                                                  Re: delete[] p or delete[] *p Leigh Johnston <leigh@i42.co.uk> - 2011-04-15 13:31 +0100
                                                                                                                                                    Re: delete[] p or delete[] *p "Paul" <pchristor@yahoo.co.uk> - 2011-04-15 14:24 +0100
                                                                                                                                                      Re: delete[] p or delete[] *p Leigh Johnston <leigh@i42.co.uk> - 2011-04-15 14:34 +0100
                                                                                                                                                        Re: delete[] p or delete[] *p "Paul" <pchristor@yahoo.co.uk> - 2011-04-15 14:49 +0100
                                                                                                                                                          Re: delete[] p or delete[] *p Leigh Johnston <leigh@i42.co.uk> - 2011-04-15 14:58 +0100
                                                                                                                                                            Re: delete[] p or delete[] *p "Paul" <pchristor@yahoo.co.uk> - 2011-04-15 16:43 +0100
                                                                                                                                                              Re: delete[] p or delete[] *p Leigh Johnston <leigh@i42.co.uk> - 2011-04-15 17:52 +0100
                                                                                                                                                                Re: delete[] p or delete[] *p "Paul" <pchristor@yahoo.co.uk> - 2011-04-15 18:55 +0100
                                                                                                                                                                  Re: delete[] p or delete[] *p Leigh Johnston <leigh@i42.co.uk> - 2011-04-15 19:28 +0100
                                                                                                                                                                    Re: delete[] p or delete[] *p "Paul" <pchristor@yahoo.co.uk> - 2011-04-15 19:43 +0100
                                                                                                                                                                      Re: delete[] p or delete[] *p Leigh Johnston <leigh@i42.co.uk> - 2011-04-15 19:55 +0100
                                                                                                                                                                        Re: delete[] p or delete[] *p "Paul" <pchristor@yahoo.co.uk> - 2011-04-15 22:19 +0100
                                                                                                                                                                          Re: delete[] p or delete[] *p Leigh Johnston <leigh@i42.co.uk> - 2011-04-15 22:27 +0100
                                                                                                                                                                            Re: delete[] p or delete[] *p "Paul" <pchristor@yahoo.co.uk> - 2011-04-15 22:53 +0100
                                                                                                                                              Re: delete[] p or delete[] *p crisgoogle <crisd@telus.net> - 2011-04-14 15:28 -0700
                                                                                                                                                Re: delete[] p or delete[] *p "Paul" <pchristor@yahoo.co.uk> - 2011-04-15 01:11 +0100
                                                                                                                                                  Re: delete[] p or delete[] *p Goran <goran.pusic@gmail.com> - 2011-04-15 01:35 -0700
                                                                                                                                                    Re: delete[] p or delete[] *p "Paul" <pchristor@yahoo.co.uk> - 2011-04-15 12:24 +0100
                                                                                                                                                      Re: delete[] p or delete[] *p Goran <goran.pusic@gmail.com> - 2011-04-15 05:06 -0700
                                                                                                                                                        Re: delete[] p or delete[] *p "Paul" <pchristor@yahoo.co.uk> - 2011-04-15 13:19 +0100
                                                                                                                                                          Re: delete[] p or delete[] *p Goran <goran.pusic@gmail.com> - 2011-04-15 06:37 -0700
                                                                                                                                                            Re: delete[] p or delete[] *p "Paul" <pchristor@yahoo.co.uk> - 2011-04-15 14:52 +0100
                                                                                                                                                              Re: delete[] p or delete[] *p Goran <goran.pusic@gmail.com> - 2011-04-15 06:54 -0700
                                                                                                                                                                Re: delete[] p or delete[] *p "Paul" <pchristor@yahoo.co.uk> - 2011-04-15 16:45 +0100
                                                                                                                                                        Re: delete[] p or delete[] *p gwowen <gwowen@gmail.com> - 2011-04-15 05:56 -0700
                                                                                                                                                          Re: delete[] p or delete[] *p "Paul" <pchristor@yahoo.co.uk> - 2011-04-15 14:30 +0100
                                                                                                                                              Re: delete[] p or delete[] *p Ian Collins <ian-news@hotmail.com> - 2011-04-15 10:44 +1200
                                                                                                                                                Re: delete[] p or delete[] *p "Paul" <pchristor@yahoo.co.uk> - 2011-04-15 00:14 +0100
                                                                                                                                  Re: delete[] p or delete[] *p Goran <goran.pusic@gmail.com> - 2011-04-15 01:22 -0700
                                                                                                                                    Re: delete[] p or delete[] *p "Paul" <pchristor@yahoo.co.uk> - 2011-04-15 12:35 +0100
                                                                                                                                      Re: delete[] p or delete[] *p Goran <goran.pusic@gmail.com> - 2011-04-15 05:05 -0700
                                                                                                                                        Re: delete[] p or delete[] *p "Paul" <pchristor@yahoo.co.uk> - 2011-04-15 13:26 +0100
                                                                                                                                          Re: delete[] p or delete[] *p Goran <goran.pusic@gmail.com> - 2011-04-15 06:35 -0700
                                                                                                                                            Re: delete[] p or delete[] *p "Paul" <pchristor@yahoo.co.uk> - 2011-04-15 16:48 +0100
                                                                                                                                              Re: delete[] p or delete[] *p Goran <goran.pusic@gmail.com> - 2011-04-17 08:50 -0700
                                                                                                                                                Re: delete[] p or delete[] *p "Paul" <pchristor@yahoo.co.uk> - 2011-04-17 18:28 +0100
                                                                                                                                                  Re: delete[] p or delete[] *p Goran <goran.pusic@gmail.com> - 2011-04-19 01:16 -0700
                                                                                                                                                    Re: delete[] p or delete[] *p "Paul" <pchristor@yahoo.co.uk> - 2011-04-19 11:42 +0100
                                                                                                                                                      Re: delete[] p or delete[] *p Goran <goran.pusic@gmail.com> - 2011-04-19 05:02 -0700
                                                                                                                                                        Re: delete[] p or delete[] *p "Paul" <pchristor@yahoo.co.uk> - 2011-04-20 16:29 +0100
                                                                                                                                                          Re: delete[] p or delete[] *p Goran <goran.pusic@gmail.com> - 2011-04-21 05:09 -0700
                                                                                                                                                            Re: delete[] p or delete[] *p "Paul" <pchristor@yahoo.co.uk> - 2011-04-21 18:24 +0100
                                                                                                                                                              Re: delete[] p or delete[] *p Goran <goran.pusic@gmail.com> - 2011-04-21 23:23 -0700
                                                                                                                                                                Re: delete[] p or delete[] *p "Paul" <pchristor@yahoo.co.uk> - 2011-04-22 09:34 +0100
                                                  Re: delete[] p or delete[] *p Goran <goran.pusic@gmail.com> - 2011-04-01 05:36 -0700
                                                Re: delete[] p or delete[] *p "Paul" <pchristor@yahoo.co.uk> - 2011-04-01 12:52 +0100
                                                  Re: delete[] p or delete[] *p Goran <goran.pusic@gmail.com> - 2011-04-01 05:46 -0700
                                      Re: delete[] p or delete[] *p Goran <goran.pusic@gmail.com> - 2011-03-31 07:21 -0700
                              Re: delete[] p or delete[] *p Leigh Johnston <leigh@i42.co.uk> - 2011-03-31 13:04 +0100
                                Re: delete[] p or delete[] *p "Paul" <pchristor@yahoo.co.uk> - 2011-03-31 14:16 +0100
                                  Re: delete[] p or delete[] *p Leigh Johnston <leigh@i42.co.uk> - 2011-03-31 14:26 +0100
                                    Re: delete[] p or delete[] *p "Paul" <pchristor@yahoo.co.uk> - 2011-03-31 14:37 +0100
                                      Re: delete[] p or delete[] *p Leigh Johnston <leigh@i42.co.uk> - 2011-03-31 14:44 +0100
                      Re: delete[] p or delete[] *p cg_chas <cg_chas@hotmail.com> - 2011-03-30 16:04 -0400
                        Re: delete[] p or delete[] *p Joshua Maurice <joshuamaurice@gmail.com> - 2011-03-30 14:04 -0700
              Re: delete[] p or delete[] *p Kai-Uwe Bux <jkherciueh@gmx.net> - 2011-03-30 20:02 +0200
                Re: delete[] p or delete[] *p "Paul" <pchristor@yahoo.co.uk> - 2011-03-30 20:21 +0100
                  Re: delete[] p or delete[] *p cg_chas <cg_chas@hotmail.com> - 2011-03-30 15:47 -0400
      Re: delete[] p or delete[] *p Goran <goran.pusic@gmail.com> - 2011-03-30 00:12 -0700
        Re: delete[] p or delete[] *p "Paul" <pchristor@yahoo.co.uk> - 2011-03-30 11:36 +0100
          Re: delete[] p or delete[] *p Goran <goran.pusic@gmail.com> - 2011-03-30 05:26 -0700
            Re: delete[] p or delete[] *p "Paul" <pchristor@yahoo.co.uk> - 2011-03-30 13:41 +0100
              Re: delete[] p or delete[] *p Goran <goran.pusic@gmail.com> - 2011-03-30 06:28 -0700
                Re: delete[] p or delete[] *p "Paul" <pchristor@yahoo.co.uk> - 2011-03-30 15:00 +0100
                  Re: delete[] p or delete[] *p Goran <goran.pusic@gmail.com> - 2011-03-30 07:47 -0700
                    Re: delete[] p or delete[] *p "Paul" <pchristor@yahoo.co.uk> - 2011-03-30 18:14 +0100
                      Re: delete[] p or delete[] *p Goran <goran.pusic@gmail.com> - 2011-03-30 10:33 -0700
                        Re: delete[] p or delete[] *p "Paul" <pchristor@yahoo.co.uk> - 2011-03-30 20:24 +0100
                          Re: delete[] p or delete[] *p Goran <goran.pusic@gmail.com> - 2011-03-30 23:31 -0700
                            Re: delete[] p or delete[] *p SG <s.gesemann@gmail.com> - 2011-03-31 04:46 -0700
                              Re: delete[] p or delete[] *p Goran <goran.pusic@gmail.com> - 2011-03-31 05:16 -0700
                              Re: delete[] p or delete[] *p "Paul" <pchristor@yahoo.co.uk> - 2011-03-31 14:28 +0100
                                Re: delete[] p or delete[] *p SG <s.gesemann@gmail.com> - 2011-03-31 09:01 -0700
                                  Re: delete[] p or delete[] *p "Paul" <pchristor@yahoo.co.uk> - 2011-03-31 18:23 +0100
                                  Re: delete[] p or delete[] *p Peter Remmers <p.remmers@expires-2011-04-30.arcornews.de> - 2011-03-31 21:32 +0200
                                    Re: delete[] p or delete[] *p Leigh Johnston <leigh@i42.co.uk> - 2011-03-31 20:37 +0100
                                    Re: delete[] p or delete[] *p cg_chas <cg_chas@hotmail.com> - 2011-03-31 16:13 -0400
                                    Re: delete[] p or delete[] *p "Paul" <pchristor@yahoo.co.uk> - 2011-03-31 21:28 +0100
                                      Re: delete[] p or delete[] *p Peter Remmers <p.remmers@expires-2011-04-30.arcornews.de> - 2011-03-31 22:55 +0200
                                        Re: delete[] p or delete[] *p "Paul" <pchristor@yahoo.co.uk> - 2011-03-31 23:06 +0100
                                          Re: delete[] p or delete[] *p Leigh Johnston <leigh@i42.co.uk> - 2011-03-31 23:43 +0100
                                            Re: delete[] p or delete[] *p Ian Collins <ian-news@hotmail.com> - 2011-04-01 12:12 +1300
                                    Re: delete[] p or delete[] *p drew@furrfu.invalid (Drew Lawson) - 2011-03-31 23:08 +0000

Page 8 of 10 — ← Prev page 1 … 6 7 [8] 9 10  Next page →


#3730

From"Paul" <pchristor@yahoo.co.uk>
Date2011-04-15 00:14 +0100
Message-ID<xdLpp.27633$rF.378@newsfe12.ams2>
In reply to#3729
"Ian Collins" <ian-news@hotmail.com> wrote in message 
news:90pblsFeeiU20@mid.individual.net...
> On 04/15/11 10:04 AM, Paul wrote:
>>
>> Your understanding is flawed, the C++ standard defines a pointer to a 2d
>> array to be of this type/ level of indirection.
>>
>> No. According to the C++ standards, a pointer to an array is a different
>> level of indirection, but in the opposite direction from what you are
>> saying.
>
> Come on, get it right.  Is there one standard that defines the C++ 
> language or more than one?  Which sections on the mythical other language 
> (not library extension) standard are you referring to?
>
> Citations, please.
>
8.3.4 Arrays
7 A consistent rule is followed for multidimensional arrays. If E is an 
ndimensional
array of rank
i´ j´ . . . ´k, then E appearing in an expression is converted to a pointer 
to an (n - 1 )dimensional
array
with rank j´ . . . ´k. If the * operator, either explicitly or implicitly as 
a result of subscripting, is applied to
this pointer, the result is the pointedto
(n - 1 )dimensional
array, which itself is immediately converted
into a pointer. 

[toc] | [prev] | [next] | [standalone]


#3736

FromGoran <goran.pusic@gmail.com>
Date2011-04-15 01:22 -0700
Message-ID<9d44ee5e-985f-4ebc-a391-9f6aa61ad75e@k3g2000prl.googlegroups.com>
In reply to#3678
On Apr 14, 5:26 pm, "Paul" <pchris...@yahoo.co.uk> wrote:
> "Goran" <goran.pu...@gmail.com> wrote in message
>
> news:149c55b8-2efb-4c39-913e-e6d204cb9676@o21g2000prh.googlegroups.com...
> On Apr 14, 2:50 pm, "Paul" <pchris...@yahoo.co.uk> wrote:
>
> > No, conclusion is fine. Nonsense are your attempts to equal "is" and
> > "points to". And, they lead to poor coding and errors (see your own
> > attempts earlier in this thread to explain your stance).
> > xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
> > Do you accept that the same pointer-type can point to an char or an array
> > of
> > char's?
>
> I accept that when pointer points to the first element of an array, we
> commonly say that it points to an array.
>
> But in
>
> int a[1];
> int (*p)[1] = &a;
>
> p is an actual, in C type system sense, pointer to an array. And
> because of such things, one should take mental note when saying
> "pointer to an array" for a pointer pointing to array's first element.
> xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
>
> Do you accpet that when Bjarne Stroustrup says a char* can point to a single
> char or an array of chars. He is in fact techincally correct. And he fully
> understand the C++ type system.

I accept, no problem. He is not saying that a char* __is__ a pointer
to an array of char, he is saying that it can __point to__.

He is merely using common expedient way of talking about these things,
where we say that TYPE*, when it points to the __first element__ of
the array, points to the __array__.

> Also do you accept what is detailed int he C++ standards where it clarifies
> that a pointer to an array, when dereferenced , returns an (n-1) dim array?

I don't know what part of standard are talking to, but I am pretty
sure that you are wrong. It rather returns a __reference to same-
dimension array__, e.g.:

void f()
{
int a[2][2]; // 2 dim array
int (*p)[2] = &a[0]; // pointer to 1d array.
int (&br)[2] = *p; // dereferencing returns a reference to a 1d array.
}

Goran.

[toc] | [prev] | [next] | [standalone]


#3742

From"Paul" <pchristor@yahoo.co.uk>
Date2011-04-15 12:35 +0100
Message-ID<s4Wpp.5521$Y71.4977@newsfe17.ams2>
In reply to#3736
"Goran" <goran.pusic@gmail.com> wrote in message 
news:9d44ee5e-985f-4ebc-a391-9f6aa61ad75e@k3g2000prl.googlegroups.com...
On Apr 14, 5:26 pm, "Paul" <pchris...@yahoo.co.uk> wrote:
> "Goran" <goran.pu...@gmail.com> wrote in message
>
> news:149c55b8-2efb-4c39-913e-e6d204cb9676@o21g2000prh.googlegroups.com...
> On Apr 14, 2:50 pm, "Paul" <pchris...@yahoo.co.uk> wrote:
>
> > No, conclusion is fine. Nonsense are your attempts to equal "is" and
> > "points to". And, they lead to poor coding and errors (see your own
> > attempts earlier in this thread to explain your stance).
> > xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
> > Do you accept that the same pointer-type can point to an char or an 
> > array
> > of
> > char's?
>
> I accept that when pointer points to the first element of an array, we
> commonly say that it points to an array.
>
> But in
>
> int a[1];
> int (*p)[1] = &a;
>
> p is an actual, in C type system sense, pointer to an array. And
> because of such things, one should take mental note when saying
> "pointer to an array" for a pointer pointing to array's first element.
> xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
>
> Do you accpet that when Bjarne Stroustrup says a char* can point to a 
> single
> char or an array of chars. He is in fact techincally correct. And he fully
> understand the C++ type system.

I accept, no problem. He is not saying that a char* __is__ a pointer
to an array of char, he is saying that it can __point to__.

xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Do you accept that the char* points to an array of chars or not?
Do you accpet that
int* p = new int[7];

p points to an array of ints?

If you do shut up and accept defeat. If you don't shut up you are wrong.

[toc] | [prev] | [next] | [standalone]


#3743

FromGoran <goran.pusic@gmail.com>
Date2011-04-15 05:05 -0700
Message-ID<f6fddafc-32b2-4ee2-95d8-dd6a3c1dbb71@f31g2000pri.googlegroups.com>
In reply to#3742
On Apr 15, 1:35 pm, "Paul" <pchris...@yahoo.co.uk> wrote:
> > Do you accpet that when Bjarne Stroustrup says a char* can point to a
> > single
> > char or an array of chars. He is in fact techincally correct. And he fully
> > understand the C++ type system.
>
> I accept, no problem. He is not saying that a char* __is__ a pointer
> to an array of char, he is saying that it can __point to__.
>
> xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
>
> Do you accept that the char* points to an array of chars or not?

I accept that we __commonly say__ that, when such pointer points to
the first element of an array, it points to the array. Underlying
truth is, though, that such pointer __is__ a pointer to a __single__
array element (here, first).

Goran.

[toc] | [prev] | [next] | [standalone]


#3746

From"Paul" <pchristor@yahoo.co.uk>
Date2011-04-15 13:26 +0100
Message-ID<GPWpp.5525$Y71.4331@newsfe17.ams2>
In reply to#3743
"Goran" <goran.pusic@gmail.com> wrote in message 
news:f6fddafc-32b2-4ee2-95d8-dd6a3c1dbb71@f31g2000pri.googlegroups.com...
On Apr 15, 1:35 pm, "Paul" <pchris...@yahoo.co.uk> wrote:
> > Do you accpet that when Bjarne Stroustrup says a char* can point to a
> > single
> > char or an array of chars. He is in fact techincally correct. And he 
> > fully
> > understand the C++ type system.
>
> I accept, no problem. He is not saying that a char* __is__ a pointer
> to an array of char, he is saying that it can __point to__.
>
> xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
>
> Do you accept that the char* points to an array of chars or not?

I accept that we __commonly say__ that, when such pointer points to
the first element of an array, it points to the array. Underlying
truth is, though, that such pointer __is__ a pointer to a __single__
array element (here, first).

xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Well you have to accept it don't you. Because this is the way it works.
But you add a "but" clause to your acceptance, so you still disagree.
You seem confused, inconsistent and you don't know what you are talking 
about.

 Your "but" clause seems to suggest that the pointer doesn't really point to 
an array because the pointer-type is a pointer to int.
But you cannot make this clear because instead of saying the pointer-type 
you say such pointer___is__a pointer to a___single___ array element. When 
you probably mean to say the pointer-type is a pointer to an int.

[toc] | [prev] | [next] | [standalone]


#3755

FromGoran <goran.pusic@gmail.com>
Date2011-04-15 06:35 -0700
Message-ID<4662b8c2-a438-4be3-943a-bf5b258b7b76@w9g2000prg.googlegroups.com>
In reply to#3746
On Apr 15, 2:26 pm, "Paul" <pchris...@yahoo.co.uk> wrote:
>  Your "but" clause seems to suggest that the pointer doesn't really point to
> an array because the pointer-type is a pointer to int.

My "but" accepts the desire for expediency in communication, nothing
more. Pointer still __is__ a pointer to the first element of the
array.

Goran.

[toc] | [prev] | [next] | [standalone]


#3764

From"Paul" <pchristor@yahoo.co.uk>
Date2011-04-15 16:48 +0100
Message-ID<zNZpp.34535$rF.32143@newsfe12.ams2>
In reply to#3755
"Goran" <goran.pusic@gmail.com> wrote in message 
news:4662b8c2-a438-4be3-943a-bf5b258b7b76@w9g2000prg.googlegroups.com...
On Apr 15, 2:26 pm, "Paul" <pchris...@yahoo.co.uk> wrote:
> Your "but" clause seems to suggest that the pointer doesn't really point 
> to
> an array because the pointer-type is a pointer to int.

My "but" accepts the desire for expediency in communication, nothing
more. Pointer still __is__ a pointer to the first element of the
array.
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

You argument was that it was a pointer to the first element and only to the 
first element. It did not point to any array.

Now since I have presented evidence that proves the experts think otherwise 
you seem to have semi accepted the truth , but you do not fully accpet it.

So be it , that is your problem.
<shrug>

[toc] | [prev] | [next] | [standalone]


#3862

FromGoran <goran.pusic@gmail.com>
Date2011-04-17 08:50 -0700
Message-ID<8dec351b-ec34-4b32-9732-b524c99148c0@d19g2000prh.googlegroups.com>
In reply to#3764
On Apr 15, 5:48 pm, "Paul" <pchris...@yahoo.co.uk> wrote:
> My "but" accepts the desire for expediency in communication, nothing
> more. Pointer still __is__ a pointer to the first element of the
> array.
> xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
>
> You argument was that it was a pointer to the first element and only to the
> first element. It did not point to any array.
>
> Now since I have presented evidence that proves the experts think otherwise

Eh!? No, you presented no evidence. You __misinterpreted__ an
interview and a part of the standard.

Goran.

[toc] | [prev] | [next] | [standalone]


#3873

From"Paul" <pchristor@yahoo.co.uk>
Date2011-04-17 18:28 +0100
Message-ID<grFqp.27780$KZ7.27724@newsfe08.ams2>
In reply to#3862
"Goran" <goran.pusic@gmail.com> wrote in message 
news:8dec351b-ec34-4b32-9732-b524c99148c0@d19g2000prh.googlegroups.com...
On Apr 15, 5:48 pm, "Paul" <pchris...@yahoo.co.uk> wrote:
> My "but" accepts the desire for expediency in communication, nothing
> more. Pointer still __is__ a pointer to the first element of the
> array.
> xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
>
> You argument was that it was a pointer to the first element and only to 
> the
> first element. It did not point to any array.
>
> Now since I have presented evidence that proves the experts think 
> otherwise

Eh!? No, you presented no evidence. You __misinterpreted__ an
interview and a part of the standard.
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
No I quoted some text from websites, no interview misquotations.

And I did not misinterpret that standard, the standard clearly states that 
pointer representation of arrays are (n-1) dimensional. 

[toc] | [prev] | [next] | [standalone]


#4002

FromGoran <goran.pusic@gmail.com>
Date2011-04-19 01:16 -0700
Message-ID<578ca21f-ba5b-4a6f-9f86-c9e294d6413d@l36g2000vbp.googlegroups.com>
In reply to#3873
On Apr 17, 7:28 pm, "Paul" <pchris...@yahoo.co.uk> wrote:
> Eh!? No, you presented no evidence. You __misinterpreted__ an
> interview and a part of the standard.
> xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
> No I quoted some text from websites, no interview misquotations.

Quotes are correct, your __interpretation__ is wrong.

> the standard clearly states that
> pointer representation of arrays are (n-1) dimensional.

Standard does no such thing. not. You made a leap from "array of
dimension n, when it appears in an expression, is __converted__ to a
pointer to an array of the dimension n-1. The opposite is not true,
and standard does not say that. You are misinterpreting that passage.

Goran.

[toc] | [prev] | [next] | [standalone]


#4011

From"Paul" <pchristor@yahoo.co.uk>
Date2011-04-19 11:42 +0100
Message-ID<0Gdrp.20307$cx.3711@newsfe24.ams2>
In reply to#4002
"Goran" <goran.pusic@gmail.com> wrote in message 
news:578ca21f-ba5b-4a6f-9f86-c9e294d6413d@l36g2000vbp.googlegroups.com...
On Apr 17, 7:28 pm, "Paul" <pchris...@yahoo.co.uk> wrote:
> Eh!? No, you presented no evidence. You __misinterpreted__ an
> interview and a part of the standard.
> xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
> No I quoted some text from websites, no interview misquotations.

Quotes are correct, your __interpretation__ is wrong.

> the standard clearly states that
> pointer representation of arrays are (n-1) dimensional.

Standard does no such thing. not. You made a leap from "array of
dimension n, when it appears in an expression, is __converted__ to a
pointer to an array of the dimension n-1. The opposite is not true,
and standard does not say that. You are misinterpreting that passage.
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Yes so if we convert an array to a pointer , the resulting pointer is a 
pointer to an (n-1) dim array.
So now we have a pointer to the array, the pointer-type just happens to be 
type pointer to (n-1) dim array. 

[toc] | [prev] | [next] | [standalone]


#4017

FromGoran <goran.pusic@gmail.com>
Date2011-04-19 05:02 -0700
Message-ID<396c6fdf-1bd4-4b03-ade6-8fb2ab0f51d1@j25g2000vbr.googlegroups.com>
In reply to#4011
On Apr 19, 12:42 pm, "Paul" <pchris...@yahoo.co.uk> wrote:
> Standard does no such thing. not. You made a leap from "array of
> dimension n, when it appears in an expression, is __converted__ to a
> pointer to an array of the dimension n-1. The opposite is not true,
> and standard does not say that. You are misinterpreting that passage.
> xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
>
> Yes so if we convert an array to a pointer , the resulting pointer is a
> pointer to an (n-1) dim array.
> So now we have a pointer to the array, the pointer-type just happens to be
> type pointer to (n-1) dim array.

The pointer-type says what the pointer __is__. When dereferenced, it
will give you a reference to the first element of the array. When
incremented, it will give you next element of the array. When indexed,
it will index inside the array. It __never__ points to the array, only
to it's elements, first or otherwise.

It walks like a duck, it quacks like a duck, it __is__ a duck.

Now go huff and puff some more, I see you like that. And it amuses me,
too.

Goran.

[toc] | [prev] | [next] | [standalone]


#4114

From"Paul" <pchristor@yahoo.co.uk>
Date2011-04-20 16:29 +0100
Message-ID<XuTrp.20046$Vm5.13051@newsfe30.ams2>
In reply to#4017
"Goran" <goran.pusic@gmail.com> wrote in message 
news:396c6fdf-1bd4-4b03-ade6-8fb2ab0f51d1@j25g2000vbr.googlegroups.com...
On Apr 19, 12:42 pm, "Paul" <pchris...@yahoo.co.uk> wrote:
> Standard does no such thing. not. You made a leap from "array of
> dimension n, when it appears in an expression, is __converted__ to a
> pointer to an array of the dimension n-1. The opposite is not true,
> and standard does not say that. You are misinterpreting that passage.
> xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
>
> Yes so if we convert an array to a pointer , the resulting pointer is a
> pointer to an (n-1) dim array.
> So now we have a pointer to the array, the pointer-type just happens to be
> type pointer to (n-1) dim array.

The pointer-type says what the pointer __is__. When dereferenced, it
will give you a reference to the first element of the array. When
incremented, it will give you next element of the array. When indexed,
it will index inside the array. It __never__ points to the array, only
to it's elements, first or otherwise.

xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
From the C standard this is the definition of a ponter-type:
"A pointer type describes an object whose value provides a reference to an 
entity of the referenced type."

This is only part of the definiton, the whole definition is publicly 
available in the C standard, and I am not trying to hide anything I am 
quoting the part I think is releveant.

The value of a pointer provides a reference to an entity, of the referenced 
type.

For a pointer to reference and array of T's, it must be type T*. T is the 
referenced type not T[Size].

A pointer to T[Size], such as T (*p)[Size], does not reference the array, it 
referneces an array-type, which is a different object than the array. It is, 
under the hood, another pointer object, it does not reference THE ARRAY of 
T's, it references a different array-type object.


[toc] | [prev] | [next] | [standalone]


#4122

FromGoran <goran.pusic@gmail.com>
Date2011-04-21 05:09 -0700
Message-ID<9a527bab-6930-4a16-88cb-d33adb909a69@z27g2000prz.googlegroups.com>
In reply to#4114
On Apr 20, 5:29 pm, "Paul" <pchris...@yahoo.co.uk> wrote:
> "Goran" <goran.pu...@gmail.com> wrote in message
>
> news:396c6fdf-1bd4-4b03-ade6-8fb2ab0f51d1@j25g2000vbr.googlegroups.com...
> On Apr 19, 12:42 pm, "Paul" <pchris...@yahoo.co.uk> wrote:
>
> > Standard does no such thing. not. You made a leap from "array of
> > dimension n, when it appears in an expression, is __converted__ to a
> > pointer to an array of the dimension n-1. The opposite is not true,
> > and standard does not say that. You are misinterpreting that passage.
> > xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
>
> > Yes so if we convert an array to a pointer , the resulting pointer is a
> > pointer to an (n-1) dim array.
> > So now we have a pointer to the array, the pointer-type just happens to be
> > type pointer to (n-1) dim array.
>
> The pointer-type says what the pointer __is__. When dereferenced, it
> will give you a reference to the first element of the array. When
> incremented, it will give you next element of the array. When indexed,
> it will index inside the array. It __never__ points to the array, only
> to it's elements, first or otherwise.
>
> xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
> From the C standard this is the definition of a ponter-type:
> "A pointer type describes an object whose value provides a reference to an
> entity of the referenced type."
>
> This is only part of the definiton, the whole definition is publicly
> available in the C standard, and I am not trying to hide anything I am
> quoting the part I think is releveant.
>
> The value of a pointer provides a reference to an entity, of the referenced
> type.
>
> For a pointer to reference and array of T's, it must be type T*. T is the
> referenced type not T[Size].
>
> A pointer to T[Size], such as T (*p)[Size], does not reference the array, it
> referneces an array-type, which is a different object than the array. It is,
> under the hood, another pointer object, it does not reference THE ARRAY of
> T's, it references a different array-type object.

You have no idea what you are talking about. Specifically, "A pointer
to T[Size], such as T (*p)[Size], does not reference the array, it
referneces an array-type, which is a different object than the array"
is simply nonsense. Among other things, it is nonsense because you are
mixing "array-type" and "object" (the latter being an instance of a
type).

You are also making stuff up as you go along. Standard __nowhere__
says that pointer references anything. It does say that pointer points
to something.

Therefore, your explanation is worthless.

Goran.

[toc] | [prev] | [next] | [standalone]


#4148

From"Paul" <pchristor@yahoo.co.uk>
Date2011-04-21 18:24 +0100
Message-ID<lLZrp.40311$5t2.26510@newsfe06.ams2>
In reply to#4122
"Goran" <goran.pusic@gmail.com> wrote in message 
news:9a527bab-6930-4a16-88cb-d33adb909a69@z27g2000prz.googlegroups.com...
On Apr 20, 5:29 pm, "Paul" <pchris...@yahoo.co.uk> wrote:
> "Goran" <goran.pu...@gmail.com> wrote in message
>
> news:396c6fdf-1bd4-4b03-ade6-8fb2ab0f51d1@j25g2000vbr.googlegroups.com...
> On Apr 19, 12:42 pm, "Paul" <pchris...@yahoo.co.uk> wrote:
>
> > Standard does no such thing. not. You made a leap from "array of
> > dimension n, when it appears in an expression, is __converted__ to a
> > pointer to an array of the dimension n-1. The opposite is not true,
> > and standard does not say that. You are misinterpreting that passage.
> > xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
>
> > Yes so if we convert an array to a pointer , the resulting pointer is a
> > pointer to an (n-1) dim array.
> > So now we have a pointer to the array, the pointer-type just happens to 
> > be
> > type pointer to (n-1) dim array.
>
> The pointer-type says what the pointer __is__. When dereferenced, it
> will give you a reference to the first element of the array. When
> incremented, it will give you next element of the array. When indexed,
> it will index inside the array. It __never__ points to the array, only
> to it's elements, first or otherwise.
>
> xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
> From the C standard this is the definition of a ponter-type:
> "A pointer type describes an object whose value provides a reference to an
> entity of the referenced type."
>
> This is only part of the definiton, the whole definition is publicly
> available in the C standard, and I am not trying to hide anything I am
> quoting the part I think is releveant.
>
> The value of a pointer provides a reference to an entity, of the 
> referenced
> type.
>
> For a pointer to reference and array of T's, it must be type T*. T is the
> referenced type not T[Size].
>
> A pointer to T[Size], such as T (*p)[Size], does not reference the array, 
> it
> referneces an array-type, which is a different object than the array. It 
> is,
> under the hood, another pointer object, it does not reference THE ARRAY of
> T's, it references a different array-type object.

You have no idea what you are talking about. Specifically, "A pointer
to T[Size], such as T (*p)[Size], does not reference the array, it
referneces an array-type, which is a different object than the array"
is simply nonsense. Among other things, it is nonsense because you are
mixing "array-type" and "object" (the latter being an instance of a
type).
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
An array-type object is not an instance of a type. Its a fancy pointer with 
typeinfo.
Apparently you have no idea, for example the object "arr" is an instance of 
what type ?
int arr[10];

This is an array-type object. The instances here are the instances of 
integer objects that make up the array.
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

You are also making stuff up as you go along. Standard __nowhere__
says that pointer references anything. It does say that pointer points
to something.

Therefore, your explanation is worthless.
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Its in the definition that C++ inherits from the C standard.

"Apointer type may be derived from a function type, an object type, or an
incomplete
type, called the referenced type. A pointer type describes an object whose
value
provides a reference to an entity of the referenced type. A pointer type
derived from
the referenced type T is sometimes called ''pointer to T''. The construction
of a
pointer type from a referenced type is called ''pointer type derivation''."


[toc] | [prev] | [next] | [standalone]


#4199

FromGoran <goran.pusic@gmail.com>
Date2011-04-21 23:23 -0700
Message-ID<93a3a8b2-06b1-42a1-b1b6-8cf6ae654eff@z31g2000vbs.googlegroups.com>
In reply to#4148
On Apr 21, 7:24 pm, "Paul" <pchris...@yahoo.co.uk> wrote:
> "Goran" <goran.pu...@gmail.com> wrote in message
>
> news:9a527bab-6930-4a16-88cb-d33adb909a69@z27g2000prz.googlegroups.com...
> On Apr 20, 5:29 pm, "Paul" <pchris...@yahoo.co.uk> wrote:
>
>
>
> > "Goran" <goran.pu...@gmail.com> wrote in message
>
> >news:396c6fdf-1bd4-4b03-ade6-8fb2ab0f51d1@j25g2000vbr.googlegroups.com...
> > On Apr 19, 12:42 pm, "Paul" <pchris...@yahoo.co.uk> wrote:
>
> > > Standard does no such thing. not. You made a leap from "array of
> > > dimension n, when it appears in an expression, is __converted__ to a
> > > pointer to an array of the dimension n-1. The opposite is not true,
> > > and standard does not say that. You are misinterpreting that passage.
> > > xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
>
> > > Yes so if we convert an array to a pointer , the resulting pointer is a
> > > pointer to an (n-1) dim array.
> > > So now we have a pointer to the array, the pointer-type just happens to
> > > be
> > > type pointer to (n-1) dim array.
>
> > The pointer-type says what the pointer __is__. When dereferenced, it
> > will give you a reference to the first element of the array. When
> > incremented, it will give you next element of the array. When indexed,
> > it will index inside the array. It __never__ points to the array, only
> > to it's elements, first or otherwise.
>
> > xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
> > From the C standard this is the definition of a ponter-type:
> > "A pointer type describes an object whose value provides a reference to an
> > entity of the referenced type."
>
> > This is only part of the definiton, the whole definition is publicly
> > available in the C standard, and I am not trying to hide anything I am
> > quoting the part I think is releveant.
>
> > The value of a pointer provides a reference to an entity, of the
> > referenced
> > type.
>
> > For a pointer to reference and array of T's, it must be type T*. T is the
> > referenced type not T[Size].
>
> > A pointer to T[Size], such as T (*p)[Size], does not reference the array,
> > it
> > referneces an array-type, which is a different object than the array. It
> > is,
> > under the hood, another pointer object, it does not reference THE ARRAY of
> > T's, it references a different array-type object.
>
> You have no idea what you are talking about. Specifically, "A pointer
> to T[Size], such as T (*p)[Size], does not reference the array, it
> referneces an array-type, which is a different object than the array"
> is simply nonsense. Among other things, it is nonsense because you are
> mixing "array-type" and "object" (the latter being an instance of a
> type).
> xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
> An array-type object is not an instance of a type. Its a fancy pointer with
> typeinfo.
> Apparently you have no idea, for example the object "arr" is an instance of
> what type ?
> int arr[10];
>
> This is an array-type object. The instances here are the instances of
> integer objects that make up the array.
> xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

What you said up here is pretty correct. However, that bears no
relevance to what I quoted you about:

"A pointer to T[Size], such as T (*p)[Size], does not reference the
array, it referneces an array-type, which is a different object than
the array."

The above is still nonsense, and your subsequent post didn't explain
anything in there.

> You are also making stuff up as you go along. Standard __nowhere__
> says that pointer references anything. It does say that pointer points
> to something.
>
> Therefore, your explanation is worthless.
> xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
> Its in the definition that C++ inherits from the C standard.
>
> "Apointer type may be derived from a function type, an object type, or an
> incomplete
> type, called the referenced type. A pointer type describes an object whose
> value
> provides a reference to an entity of the referenced type. A pointer type
> derived from
> the referenced type T is sometimes called ''pointer to T''. The construction
> of a
> pointer type from a referenced type is called ''pointer type derivation''."

My words "standard never says that pointer references anything" are
correct. Your standard quote, e.g.  "A pointer type derived from the
referenced type T is sometimes called ''pointer to T''" does not say,
nor mean, that pointer __references__ anything, which is what you
previous post said. Pointer __points to__ something, and this is what
standard does say. And especially in the context of C++, word
"reference" typically has another meaning.

I believe that you are arbitrarily muddying things up to support your
worthless point.

Goran.

[toc] | [prev] | [next] | [standalone]


#4203

From"Paul" <pchristor@yahoo.co.uk>
Date2011-04-22 09:34 +0100
Message-ID<k9bsp.41490$0j7.35986@newsfe20.ams2>
In reply to#4199
"Goran" <goran.pusic@gmail.com> wrote in message 
news:93a3a8b2-06b1-42a1-b1b6-8cf6ae654eff@z31g2000vbs.googlegroups.com...
On Apr 21, 7:24 pm, "Paul" <pchris...@yahoo.co.uk> wrote:
> "Goran" <goran.pu...@gmail.com> wrote in message
> >news:396c6fdf-1bd4-4b03-ade6-8fb2ab0f51d1@j25g2000vbr.googlegroups.com...
> > On Apr 19, 12:42 pm, "Paul" <pchris...@yahoo.co.uk> wrote:
>
> > > Standard does no such thing. not. You made a leap from "array of
> > > dimension n, when it appears in an expression, is __converted__ to a
> > > pointer to an array of the dimension n-1. The opposite is not true,
> > > and standard does not say that. You are misinterpreting that passage.
> > > xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
>
> > > Yes so if we convert an array to a pointer , the resulting pointer is 
> > > a
> > > pointer to an (n-1) dim array.
> > > So now we have a pointer to the array, the pointer-type just happens 
> > > to
> > > be
> > > type pointer to (n-1) dim array.
>
> > The pointer-type says what the pointer __is__. When dereferenced, it
> > will give you a reference to the first element of the array. When
> > incremented, it will give you next element of the array. When indexed,
> > it will index inside the array. It __never__ points to the array, only
> > to it's elements, first or otherwise.
>
> > xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
> > From the C standard this is the definition of a ponter-type:
> > "A pointer type describes an object whose value provides a reference to 
> > an
> > entity of the referenced type."
>
> > This is only part of the definiton, the whole definition is publicly
> > available in the C standard, and I am not trying to hide anything I am
> > quoting the part I think is releveant.
>
> > The value of a pointer provides a reference to an entity, of the
> > referenced
> > type.
>
> > For a pointer to reference and array of T's, it must be type T*. T is 
> > the
> > referenced type not T[Size].
>
> > A pointer to T[Size], such as T (*p)[Size], does not reference the 
> > array,
> > it
> > referneces an array-type, which is a different object than the array. It
> > is,
> > under the hood, another pointer object, it does not reference THE ARRAY 
> > of
> > T's, it references a different array-type object.
>
> You have no idea what you are talking about. Specifically, "A pointer
> to T[Size], such as T (*p)[Size], does not reference the array, it
> referneces an array-type, which is a different object than the array"
> is simply nonsense. Among other things, it is nonsense because you are
> mixing "array-type" and "object" (the latter being an instance of a
> type).
> xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
> An array-type object is not an instance of a type. Its a fancy pointer 
> with
> typeinfo.
> Apparently you have no idea, for example the object "arr" is an instance 
> of
> what type ?
> int arr[10];
>
> This is an array-type object. The instances here are the instances of
> integer objects that make up the array.
> xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

What you said up here is pretty correct. However, that bears no
relevance to what I quoted you about:

"A pointer to T[Size], such as T (*p)[Size], does not reference the
array, it referneces an array-type, which is a different object than
the array."

The above is still nonsense, and your subsequent post didn't explain
anything in there.
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
The only nonsesne is coming from you.
You are trying to argue that a pointer to an array of chars, is a pointer to 
an array-type object and not a pointer to char type objects.
Which is obviously technically incorrect.
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx


> You are also making stuff up as you go along. Standard __nowhere__
> says that pointer references anything. It does say that pointer points
> to something.
>
> Therefore, your explanation is worthless.
> xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
> Its in the definition that C++ inherits from the C standard.
>
> "Apointer type may be derived from a function type, an object type, or an
> incomplete
> type, called the referenced type. A pointer type describes an object whose
> value
> provides a reference to an entity of the referenced type. A pointer type
> derived from
> the referenced type T is sometimes called ''pointer to T''. The 
> construction
> of a
> pointer type from a referenced type is called ''pointer type 
> derivation''."

My words "standard never says that pointer references anything" are
correct. Your standard quote, e.g.  "A pointer type derived from the
referenced type T is sometimes called ''pointer to T''" does not say,
nor mean, that pointer __references__ anything, which is what you
previous post said. Pointer __points to__ something, and this is what
standard does say. And especially in the context of C++, word
"reference" typically has another meaning.

I believe that you are arbitrarily muddying things up to support your
worthless point.
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Its quite obviously you that are muddying things up.
You seem to speaking a big pile of shit abut what your interpretation of 
"references" is.
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 

[toc] | [prev] | [next] | [standalone]


#2968

FromGoran <goran.pusic@gmail.com>
Date2011-04-01 05:36 -0700
Message-ID<f86e16c2-a03b-4e01-a5dc-410431677136@f11g2000vbx.googlegroups.com>
In reply to#2964
On Apr 1, 12:53 pm, "Paul" <pchris...@yahoo.co.uk> wrote:
> "Goran" <goran.pu...@gmail.com> wrote in message
>
> news:b371e97b-2d73-4cb0-8f96-72f79f8fb61f@r13g2000yqk.googlegroups.com...
> On Mar 31, 7:20 pm, "Paul" <pchris...@yahoo.co.uk> wrote:
>
>
>
> > "Goran" <goran.pu...@gmail.com> wrote in message
>
> >news:c59c6538-f590-41aa-8336-e44ce7315c8a@1g2000yqq.googlegroups.com...
> > On Mar 31, 4:55 pm, "Paul" <pchris...@yahoo.co.uk> wrote:
>
> > > First things first. You do understand now that casts you tried to pull
> > > off are UB, right?
>
> > > xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
>
> > > What exactly is UB? Casting in general produces UB, or only when I cast?
>
> > In your post
> > here:http://groups.google.com/group/comp.lang.c++/msg/1948e01fd0971cac,
> > I claimed that first two casts were UB. You claimed that they were
> > not. I proved you that they were (read back, please).
>
> > xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
>
> > You haven't proved anything is UB,
>
> Yes I have. Read this again:
>
> http://groups.google.com/group/comp.lang.c++/msg/e274c527afabc5f4
> xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
>
> This is your code that is wrong not the cast. You cannot even explain what
> is wrong with the cast in your opinion , its just wrong?

Being polite when asking for help is somewhat better. You might want
to try e.g. this way:

"I don't understand compiler errors. I did ABC, compiler told me XYZ.
What should I do?"

Goran.

[toc] | [prev] | [next] | [standalone]


#2965

From"Paul" <pchristor@yahoo.co.uk>
Date2011-04-01 12:52 +0100
Message-ID<y0jlp.3192$7u3.1368@newsfe04.ams2>
In reply to#2963
"Goran" <goran.pusic@gmail.com> wrote in message 
news:b371e97b-2d73-4cb0-8f96-72f79f8fb61f@r13g2000yqk.googlegroups.com...
On Mar 31, 7:20 pm, "Paul" <pchris...@yahoo.co.uk> wrote:
> "Goran" <goran.pu...@gmail.com> wrote in message
>
> news:c59c6538-f590-41aa-8336-e44ce7315c8a@1g2000yqq.googlegroups.com...
> On Mar 31, 4:55 pm, "Paul" <pchris...@yahoo.co.uk> wrote:
>
> > First things first. You do understand now that casts you tried to pull
> > off are UB, right?
>
> > xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
>
> > What exactly is UB? Casting in general produces UB, or only when I cast?
>
> In your post 
> here:http://groups.google.com/group/comp.lang.c++/msg/1948e01fd0971cac,
> I claimed that first two casts were UB. You claimed that they were
> not. I proved you that they were (read back, please).
>
> xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
>
> You haven't proved anything is UB,

Yes I have. Read this again:

http://groups.google.com/group/comp.lang.c++/msg/e274c527afabc5f4

Now... (proof by contradiction follows... Do you know what "proof by
contradiction" means, BTW? I hope so. If not, I hope you can google
it.)

So... See the code? See the line:

Base (*p2)[3] = (Base (*)[3])new Derived[2][3];

?

You claimed that one should be able to do it, in this post:
http://groups.google.com/group/comp.lang.c++/msg/310cebb655d59715

So, presuming that your cast is not UB, I made you a bit of code that
uses your cast and doesn't work correctly. I'll repeat offending part,
slightly modified, since you seem to have an issue with assert macro
(a macro is not a statement, which is something you don't seem to
understand well):

Base (*p2)[3] = (Base (*)[3])new Derived[2][3]; // Presumption: no UB
in cast.
const Base& b = p2[0][1];
if (b.i) std::cout << "This is not possible!";
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

This is because you think that the pointer-type Base (*)[3], points to an 
array of Base[3], but it doesn't it points to an array of Derived[3].

Its your code that is wrong because you derefernce p2 as if it were a Base, 
but it points to a Derived.
p2[i] returns i*sizeof(Base[3]), this is not the same as 
i*sizeof(Derived[3]).

The memory layout of the object array is as follows:
[[Base][Derived]] [[Base][Derived]] [[Base][Dervied]]

You are trying to index this array in chunks sizeof(Base[3]).

This example to shows that the pointer-type does not define the object it 
points to.
p2 points to an array of Derived, not an array of Bases.

[toc] | [prev] | [next] | [standalone]


#2970

FromGoran <goran.pusic@gmail.com>
Date2011-04-01 05:46 -0700
Message-ID<8796d6f6-565a-4758-93fc-51f91342dab0@l30g2000vbn.googlegroups.com>
In reply to#2965
On Apr 1, 1:52 pm, "Paul" <pchris...@yahoo.co.uk> wrote:
> "Goran" <goran.pu...@gmail.com> wrote in message
>
> news:b371e97b-2d73-4cb0-8f96-72f79f8fb61f@r13g2000yqk.googlegroups.com...
> On Mar 31, 7:20 pm, "Paul" <pchris...@yahoo.co.uk> wrote:
>
>
>
> > "Goran" <goran.pu...@gmail.com> wrote in message
>
> >news:c59c6538-f590-41aa-8336-e44ce7315c8a@1g2000yqq.googlegroups.com...
> > On Mar 31, 4:55 pm, "Paul" <pchris...@yahoo.co.uk> wrote:
>
> > > First things first. You do understand now that casts you tried to pull
> > > off are UB, right?
>
> > > xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
>
> > > What exactly is UB? Casting in general produces UB, or only when I cast?
>
> > In your post
> > here:http://groups.google.com/group/comp.lang.c++/msg/1948e01fd0971cac,
> > I claimed that first two casts were UB. You claimed that they were
> > not. I proved you that they were (read back, please).
>
> > xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
>
> > You haven't proved anything is UB,
>
> Yes I have. Read this again:
>
> http://groups.google.com/group/comp.lang.c++/msg/e274c527afabc5f4
>
> Now... (proof by contradiction follows... Do you know what "proof by
> contradiction" means, BTW? I hope so. If not, I hope you can google
> it.)
>
> So... See the code? See the line:
>
> Base (*p2)[3] = (Base (*)[3])new Derived[2][3];
>
> ?
>
> You claimed that one should be able to do it, in this post:http://groups.google.com/group/comp.lang.c++/msg/310cebb655d59715
>
> So, presuming that your cast is not UB, I made you a bit of code that
> uses your cast and doesn't work correctly. I'll repeat offending part,
> slightly modified, since you seem to have an issue with assert macro
> (a macro is not a statement, which is something you don't seem to
> understand well):
>
> Base (*p2)[3] = (Base (*)[3])new Derived[2][3]; // Presumption: no UB
> in cast.
> const Base& b = p2[0][1];
> if (b.i) std::cout << "This is not possible!";
> xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
>
> This is because you think that the pointer-type Base (*)[3], points to an
> array of Base[3], but it doesn't it points to an array of Derived[3].
>
> Its your code that is wrong because you derefernce p2 as if it were a Base,
> but it points to a Derived.

First off, p2 is not a Base, it's not even a pointer-to-a-Base, it's a
pointer to Base[3]. But that is irrelevant.

My code is perfectly fine. I can't possibly dereference p2 as if it
were Derived[3], because type of *p2 is Base[3], not Derived[3]. Why
did this happen? Because of __your__ cast, not because of anything in
__my__ code.


> The memory layout of the object array is as follows:
> [[Base][Derived]] [[Base][Derived]] [[Base][Dervied]]
>
> You are trying to index this array in chunks sizeof(Base[3]).

Oh. Well, I am glad that you managed to understand the explanation I
gave you earlier.

> This example to shows that the pointer-type does not define the object it
> points to.
> p2 points to an array of Derived, not an array of Bases.

... because __your__ cast was UB.

Goran.

[toc] | [prev] | [next] | [standalone]


Page 8 of 10 — ← Prev page 1 … 6 7 [8] 9 10  Next page →

Back to top | Article view | comp.lang.c++


csiph-web