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


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

I think references should have been const by default

Started byJuha Nieminen <nospam@thanks.invalid>
First post2021-10-21 05:23 +0000
Last post2021-10-24 14:20 +0000
Articles 20 on this page of 179 — 23 participants

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


Contents

  I think references should have been const by default Juha Nieminen <nospam@thanks.invalid> - 2021-10-21 05:23 +0000
    Re: I think references should have been const by default David Brown <david.brown@hesbynett.no> - 2021-10-21 08:54 +0200
      Re: I think references should have been const by default Juha Nieminen <nospam@thanks.invalid> - 2021-10-21 09:48 +0000
        Re: I think references should have been const by default Paavo Helde <myfirstname@osa.pri.ee> - 2021-10-21 12:55 +0300
        Re: I think references should have been const by default David Brown <david.brown@hesbynett.no> - 2021-10-21 12:57 +0200
          Re: I think references should have been const by default RacingRabbit@watershipdown.co.uk - 2021-10-21 13:40 +0000
            Re: I think references should have been const by default Bart <bc@freeuk.com> - 2021-10-21 15:04 +0100
              Re: I think references should have been const by default Manfred <noname@add.invalid> - 2021-10-21 16:41 +0200
                Re: I think references should have been const by default RacingRabbit@watershipdown.co.uk - 2021-10-21 14:57 +0000
              Re: I think references should have been const by default RacingRabbit@watershipdown.co.uk - 2021-10-21 14:51 +0000
              Re: I think references should have been const by default James Kuyper <jameskuyper@alumni.caltech.edu> - 2021-10-21 12:09 -0400
                Re: I think references should have been const by default Bart <bc@freeuk.com> - 2021-10-21 23:49 +0100
                  Re: I think references should have been const by default "james...@alumni.caltech.edu" <jameskuyper@alumni.caltech.edu> - 2021-10-21 16:21 -0700
                    Re: I think references should have been const by default Bart <bc@freeuk.com> - 2021-10-22 16:14 +0100
                      Re: I think references should have been const by default Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2021-10-22 12:04 -0700
                        Re: I think references should have been const by default Bart <bc@freeuk.com> - 2021-10-22 20:47 +0100
                          Re: I think references should have been const by default Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2021-10-22 13:29 -0700
                      Re: I think references should have been const by default David Brown <david.brown@hesbynett.no> - 2021-10-23 11:54 +0200
                        Re: I think references should have been const by default Bart <bc@freeuk.com> - 2021-10-23 11:22 +0100
                          Re: I think references should have been const by default David Brown <david.brown@hesbynett.no> - 2021-10-23 12:35 +0200
                        Re: I think references should have been const by default Ben Bacarisse <ben.usenet@bsb.me.uk> - 2021-10-23 13:23 +0100
                          Re: I think references should have been const by default Bart <bc@freeuk.com> - 2021-10-23 13:57 +0100
                            Re: I think references should have been const by default Ben Bacarisse <ben.usenet@bsb.me.uk> - 2021-10-23 21:02 +0100
                            Re: I think references should have been const by default Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2021-10-23 15:07 -0700
                              Re: I think references should have been const by default Tim Rentsch <tr.17687@z991.linuxsc.com> - 2021-10-23 21:15 -0700
                          Re: I think references should have been const by default Tim Rentsch <tr.17687@z991.linuxsc.com> - 2021-10-23 21:12 -0700
                Re: I think references should have been const by default David Brown <david.brown@hesbynett.no> - 2021-10-22 11:13 +0200
                  Re: I think references should have been const by default James Kuyper <jameskuyper@alumni.caltech.edu> - 2021-10-22 19:18 -0400
              Re: I think references should have been const by default Juha Nieminen <nospam@thanks.invalid> - 2021-10-22 04:41 +0000
                Re: I think references should have been const by default Chris Vine <chris@cvine--nospam--.freeserve.co.uk> - 2021-10-23 21:30 +0100
                  Re: I think references should have been const by default Juha Nieminen <nospam@thanks.invalid> - 2021-10-25 04:51 +0000
                    Re: I think references should have been const by default Chris Vine <chris@cvine--nospam--.freeserve.co.uk> - 2021-10-26 00:53 +0100
              Re: I think references should have been const by default David Brown <david.brown@hesbynett.no> - 2021-10-22 09:46 +0200
                Re: I think references should have been const by default Bart <bc@freeuk.com> - 2021-10-22 15:48 +0100
                  Re: I think references should have been const by default David Brown <david.brown@hesbynett.no> - 2021-10-23 12:21 +0200
                    Re: I think references should have been const by default Bart <bc@freeuk.com> - 2021-10-23 12:06 +0100
                      Re: I think references should have been const by default David Brown <david.brown@hesbynett.no> - 2021-10-23 18:45 +0200
                        Re: I think references should have been const by default Bart <bc@freeuk.com> - 2021-10-23 18:58 +0100
                          Re: I think references should have been const by default David Brown <david.brown@hesbynett.no> - 2021-10-24 12:11 +0200
                            Re: I think references should have been const by default Bart <bc@freeuk.com> - 2021-10-24 23:11 +0100
                              Re: I think references should have been const by default Öö Tiib <ootiib@hot.ee> - 2021-10-24 16:18 -0700
                                Re: I think references should have been const by default Bart <bc@freeuk.com> - 2021-10-25 00:58 +0100
                        Re: I think references should have been const by default RacingRabbit@watershipdown.co.uk - 2021-10-25 08:21 +0000
                          Re: I think references should have been const by default Juha Nieminen <nospam@thanks.invalid> - 2021-10-25 09:47 +0000
                            Re: I think references should have been const by default Bo Persson <bo@bo-persson.se> - 2021-10-25 12:33 +0200
                            Re: I think references should have been const by default RacingRabbit@watershipdown.co.uk - 2021-10-25 14:19 +0000
                              Re: I think references should have been const by default James Kuyper <jameskuyper@alumni.caltech.edu> - 2021-10-25 10:59 -0400
                                Re: I think references should have been const by default Manfred <noname@add.invalid> - 2021-10-25 17:56 +0200
                                  Re: I think references should have been const by default Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2021-10-25 11:11 -0700
                                    Re: I think references should have been const by default Manfred <noname@add.invalid> - 2021-10-26 17:15 +0200
                                      Re: I think references should have been const by default Tim Rentsch <tr.17687@z991.linuxsc.com> - 2021-10-29 06:41 -0700
                                Re: I think references should have been const by default RacingRabbit@watershipdown.co.uk - 2021-10-25 16:14 +0000
                                  Re: I think references should have been const by default James Kuyper <jameskuyper@alumni.caltech.edu> - 2021-10-25 13:14 -0400
                                    Re: I think references should have been const by default RacingRabbit@watershipdown.co.uk - 2021-10-26 08:18 +0000
                                      Re: I think references should have been const by default Bart <bc@freeuk.com> - 2021-10-26 12:39 +0100
                                        Re: I think references should have been const by default Ben Bacarisse <ben.usenet@bsb.me.uk> - 2021-10-26 14:29 +0100
                                          Re: I think references should have been const by default Bart <bc@freeuk.com> - 2021-10-26 15:11 +0100
                                            Re: I think references should have been const by default Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2021-10-26 09:49 -0700
                                              Re: I think references should have been const by default Bart <bc@freeuk.com> - 2021-10-26 18:38 +0100
                                                Re: I think references should have been const by default Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2021-10-26 11:20 -0700
                                                  Re: I think references should have been const by default Bart <bc@freeuk.com> - 2021-10-26 20:32 +0100
                                                    Re: I think references should have been const by default David Brown <david.brown@hesbynett.no> - 2021-10-26 22:18 +0200
                                              Re: I think references should have been const by default Juha Nieminen <nospam@thanks.invalid> - 2021-10-27 04:43 +0000
                                                Re: I think references should have been const by default David Brown <david.brown@hesbynett.no> - 2021-10-27 08:29 +0200
                                                Re: I think references should have been const by default Tim Rentsch <tr.17687@z991.linuxsc.com> - 2021-10-29 06:32 -0700
                                                  Re: I think references should have been const by default Juha Nieminen <nospam@thanks.invalid> - 2021-11-01 06:12 +0000
                                                    Re: I think references should have been const by default David Brown <david.brown@hesbynett.no> - 2021-11-01 08:53 +0100
                                                    Re: I think references should have been const by default James Kuyper <jameskuyper@alumni.caltech.edu> - 2021-11-01 11:26 -0400
                                                      Re: I think references should have been const by default "Alf P. Steinbach" <alf.p.steinbach@gmail.com> - 2021-11-02 16:19 +0100
                                                        Re: I think references should have been const by default James Kuyper <jameskuyper@alumni.caltech.edu> - 2021-11-02 12:54 -0400
                                                        Re: I think references should have been const by default Paavo Helde <myfirstname@osa.pri.ee> - 2021-11-02 23:49 +0200
                                                          Re: I think references should have been const by default "Alf P. Steinbach" <alf.p.steinbach@gmail.com> - 2021-11-03 00:38 +0100
                                        Re: I think references should have been const by default RacingRabbit@watershipdown.co.uk - 2021-10-26 14:36 +0000
                                          Re: I think references should have been const by default Bart <bc@freeuk.com> - 2021-10-26 15:55 +0100
                                            Re: I think references should have been const by default RacingRabbit@watershipdown.co.uk - 2021-10-26 15:26 +0000
                                              Re: I think references should have been const by default Bart <bc@freeuk.com> - 2021-10-26 20:35 +0100
                                              Re: I think references should have been const by default Juha Nieminen <nospam@thanks.invalid> - 2021-10-27 04:44 +0000
                                          Re: I think references should have been const by default James Kuyper <jameskuyper@alumni.caltech.edu> - 2021-10-26 11:27 -0400
                                      Re: I think references should have been const by default James Kuyper <jameskuyper@alumni.caltech.edu> - 2021-10-26 10:31 -0400
                                        Re: I think references should have been const by default RacingRabbit@watershipdown.co.uk - 2021-10-26 14:42 +0000
                                          Re: I think references should have been const by default James Kuyper <jameskuyper@alumni.caltech.edu> - 2021-10-26 11:22 -0400
                                            Re: I think references should have been const by default RacingRabbit@watershipdown.co.uk - 2021-10-26 15:30 +0000
                                              Re: I think references should have been const by default James Kuyper <jameskuyper@alumni.caltech.edu> - 2021-10-26 12:23 -0400
                                                Re: I think references should have been const by default James Kuyper <jameskuyper@alumni.caltech.edu> - 2021-10-26 12:51 -0400
                                                Re: I think references should have been const by default James Kuyper <jameskuyper@alumni.caltech.edu> - 2021-10-26 14:34 -0400
                                                  Re: I think references should have been const by default "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2021-10-26 12:57 -0700
                                                Re: I think references should have been const by default RacingRabbit@watershipdown.co.uk - 2021-10-27 07:57 +0000
                                                  Re: I think references should have been const by default Juha Nieminen <nospam@thanks.invalid> - 2021-10-27 08:47 +0000
                                                    Re: I think references should have been const by default JohnnyCameLater@whatsthetime.net - 2021-10-27 14:29 +0000
                                                      Re: I think references should have been const by default Juha Nieminen <nospam@thanks.invalid> - 2021-10-28 05:17 +0000
                                                        Re: I think references should have been const by default JohnnyCameLater@whatsthetime.net - 2021-10-28 09:30 +0000
                                                          Re: I think references should have been const by default Juha Nieminen <nospam@thanks.invalid> - 2021-10-29 04:47 +0000
                                                          Re: I think references should have been const by default Juha Nieminen <nospam@thanks.invalid> - 2021-10-29 05:11 +0000
                                                            Re: I think references should have been const by default JohnnyCameLater@whatsthetime.net - 2021-10-29 08:40 +0000
                                                              Re: I think references should have been const by default Juha Nieminen <nospam@thanks.invalid> - 2021-11-01 06:15 +0000
                                                  Re: I think references should have been const by default David Brown <david.brown@hesbynett.no> - 2021-10-27 11:07 +0200
                                                    Re: I think references should have been const by default JohnnyCameLater@whatsthetime.net - 2021-10-27 14:30 +0000
                                                      Re: I think references should have been const by default David Brown <david.brown@hesbynett.no> - 2021-10-27 17:30 +0200
                                                        Re: I think references should have been const by default JohnnyCameLater@whatsthetime.net - 2021-10-27 15:46 +0000
                                                        Re: I think references should have been const by default scott@slp53.sl.home (Scott Lurndal) - 2021-10-27 16:13 +0000
                                                      Re: I think references should have been const by default James Kuyper <jameskuyper@alumni.caltech.edu> - 2021-10-27 11:39 -0400
                                                        Re: I think references should have been const by default JohnnyCameLater@whatsthetime.net - 2021-10-27 15:51 +0000
                                                          Re: I think references should have been const by default Ben Bacarisse <ben.usenet@bsb.me.uk> - 2021-10-27 17:21 +0100
                                                            Re: I think references should have been const by default JohnnyCameLater@whatsthetime.net - 2021-10-28 09:29 +0000
                                                              Re: I think references should have been const by default Bart <bc@freeuk.com> - 2021-10-28 11:20 +0100
                                                          Re: I think references should have been const by default James Kuyper <jameskuyper@alumni.caltech.edu> - 2021-10-27 12:26 -0400
                                                            Re: I think references should have been const by default Anand Hariharan <mailto.anand.hariharan@gmail.com> - 2021-10-31 09:22 -0700
                                                              Re: I think references should have been const by default James Kuyper <jameskuyper@alumni.caltech.edu> - 2021-11-01 00:13 -0400
                                                          Re: I think references should have been const by default Juha Nieminen <nospam@thanks.invalid> - 2021-10-28 05:20 +0000
                                                            Re: I think references should have been const by default "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2021-10-27 23:10 -0700
                                                            Re: I think references should have been const by default JohnnyCameLater@whatsthetime.net - 2021-10-28 09:30 +0000
                                                              Re: I think references should have been const by default Juha Nieminen <nospam@thanks.invalid> - 2021-10-29 04:51 +0000
                                                                Re: I think references should have been const by default JohnnyCameLater@whatsthetime.net - 2021-10-29 08:39 +0000
                                                                  Re: I think references should have been const by default Juha Nieminen <nospam@thanks.invalid> - 2021-11-01 06:34 +0000
                                                    Re: I think references should have been const by default Chris Vine <chris@cvine--nospam--.freeserve.co.uk> - 2021-10-27 17:41 +0100
                                                      Re: I think references should have been const by default David Brown <david.brown@hesbynett.no> - 2021-10-27 19:02 +0200
                                                        Re: I think references should have been const by default Chris Vine <chris@cvine--nospam--.freeserve.co.uk> - 2021-10-27 18:21 +0100
                                                  Re: I think references should have been const by default James Kuyper <jameskuyper@alumni.caltech.edu> - 2021-10-27 11:38 -0400
                                                    Re: I think references should have been const by default JohnnyCameLater@whatsthetime.net - 2021-10-27 15:49 +0000
                                                      Re: I think references should have been const by default James Kuyper <jameskuyper@alumni.caltech.edu> - 2021-10-27 12:36 -0400
                                              Re: I think references should have been const by default Juha Nieminen <nospam@thanks.invalid> - 2021-10-27 04:57 +0000
                                  Re: I think references should have been const by default Bart <bc@freeuk.com> - 2021-10-25 18:19 +0100
                                  Re: I think references should have been const by default Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2021-10-25 10:48 -0700
                                    Re: I think references should have been const by default RacingRabbit@watershipdown.co.uk - 2021-10-26 08:21 +0000
                                      Re: I think references should have been const by default Juha Nieminen <nospam@thanks.invalid> - 2021-10-26 08:37 +0000
                                        Re: I think references should have been const by default RacingRabbit@watershipdown.co.uk - 2021-10-26 09:02 +0000
                                          Re: I think references should have been const by default Juha Nieminen <nospam@thanks.invalid> - 2021-10-26 11:14 +0000
                                            Re: I think references should have been const by default RacingRabbit@watershipdown.co.uk - 2021-10-26 14:35 +0000
                                              Re: I think references should have been const by default Juha Nieminen <nospam@thanks.invalid> - 2021-10-27 05:01 +0000
                                            Re: I think references should have been const by default Tim Rentsch <tr.17687@z991.linuxsc.com> - 2021-10-29 06:34 -0700
                                          Re: I think references should have been const by default James Kuyper <jameskuyper@alumni.caltech.edu> - 2021-10-26 10:43 -0400
                                            Re: I think references should have been const by default RacingRabbit@watershipdown.co.uk - 2021-10-26 15:21 +0000
                                              Re: I think references should have been const by default David Brown <david.brown@hesbynett.no> - 2021-10-26 22:32 +0200
                                              Re: I think references should have been const by default Juha Nieminen <nospam@thanks.invalid> - 2021-10-27 05:04 +0000
                                      Re: I think references should have been const by default James Kuyper <jameskuyper@alumni.caltech.edu> - 2021-10-26 10:42 -0400
                                        Re: I think references should have been const by default RacingRabbit@watershipdown.co.uk - 2021-10-26 14:48 +0000
                                          Re: I think references should have been const by default James Kuyper <jameskuyper@alumni.caltech.edu> - 2021-10-26 11:52 -0400
                                          Re: I think references should have been const by default Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2021-10-26 10:22 -0700
                                            Re: I think references should have been const by default Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2021-10-26 10:27 -0700
                                              Re: I think references should have been const by default James Kuyper <jameskuyper@alumni.caltech.edu> - 2021-10-26 14:06 -0400
                                            Re: I think references should have been const by default Tim Rentsch <tr.17687@z991.linuxsc.com> - 2021-10-29 06:45 -0700
                                              Re: I think references should have been const by default Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2021-10-29 11:11 -0700
                                                Re: I think references should have been const by default Tim Rentsch <tr.17687@z991.linuxsc.com> - 2022-04-25 07:39 -0700
                                                  Re: I think references should have been const by default Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2022-04-25 10:59 -0700
                                  Re: I think references should have been const by default Juha Nieminen <nospam@thanks.invalid> - 2021-10-26 05:29 +0000
                                    Re: I think references should have been const by default David Brown <david.brown@hesbynett.no> - 2021-10-26 08:53 +0200
                                    Re: I think references should have been const by default RacingRabbit@watershipdown.co.uk - 2021-10-26 08:23 +0000
                                      Re: I think references should have been const by default Juha Nieminen <nospam@thanks.invalid> - 2021-10-26 08:40 +0000
                                Re: I think references should have been const by default Juha Nieminen <nospam@thanks.invalid> - 2021-10-26 05:18 +0000
                                  Re: I think references should have been const by default David Brown <david.brown@hesbynett.no> - 2021-10-26 09:07 +0200
                                  Re: I think references should have been const by default James Kuyper <jameskuyper@alumni.caltech.edu> - 2021-10-26 11:03 -0400
                            Re: I think references should have been const by default James Kuyper <jameskuyper@alumni.caltech.edu> - 2021-10-25 10:39 -0400
                              Re: I think references should have been const by default Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2021-10-25 10:56 -0700
                          Re: I think references should have been const by default James Kuyper <jameskuyper@alumni.caltech.edu> - 2021-10-25 10:30 -0400
                            Re: I think references should have been const by default RacingRabbit@watershipdown.co.uk - 2021-10-25 14:39 +0000
                              Re: I think references should have been const by default James Kuyper <jameskuyper@alumni.caltech.edu> - 2021-10-25 11:05 -0400
                          Re: I think references should have been const by default "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2021-10-25 12:45 -0700
                            Re: I think references should have been const by default "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2021-10-26 11:20 -0700
                  Re: I think references should have been const by default Juha Nieminen <nospam@thanks.invalid> - 2021-10-25 05:00 +0000
                    Re: I think references should have been const by default Bart <bc@freeuk.com> - 2021-10-25 12:13 +0100
                      Re: I think references should have been const by default Juha Nieminen <nospam@thanks.invalid> - 2021-10-26 05:36 +0000
                    Re: I think references should have been const by default Manfred <noname@add.invalid> - 2021-10-25 16:58 +0200
      Re: I think references should have been const by default "daniel...@gmail.com" <danielaparker@gmail.com> - 2021-10-22 12:28 -0700
    Re: I think references should have been const by default RacingRabbit@watershipdown.co.uk - 2021-10-21 09:12 +0000
      Re: I think references should have been const by default Juha Nieminen <nospam@thanks.invalid> - 2021-10-21 09:52 +0000
        Re: I think references should have been const by default RacingRabbit@watershipdown.co.uk - 2021-10-21 10:36 +0000
          Re: I think references should have been const by default Juha Nieminen <nospam@thanks.invalid> - 2021-10-22 04:45 +0000
      Re: I think references should have been const by default James Kuyper <jameskuyper@alumni.caltech.edu> - 2021-10-21 12:07 -0400
    Re: I think references should have been const by default Paavo Helde <myfirstname@osa.pri.ee> - 2021-10-21 12:18 +0300
    Re: I think references should have been const by default Bonita Montero <Bonita.Montero@gmail.com> - 2021-10-21 13:13 +0200
      Re: I think references should have been const by default Bo Persson <bo@bo-persson.se> - 2021-10-21 15:08 +0200
      Re: I think references should have been const by default Juha Nieminen <nospam@thanks.invalid> - 2021-10-22 04:45 +0000
        Re: I think references should have been const by default Bonita Montero <Bonita.Montero@gmail.com> - 2021-10-22 07:55 +0200
          Re: I think references should have been const by default Branimir Maksimovic <branimir.maksimovic@icloud.com> - 2021-10-22 11:21 +0000
    Re: I think references should have been const by default "Alf P. Steinbach" <alf.p.steinbach@gmail.com> - 2021-10-21 13:22 +0200
      Re: I think references should have been const by default Juha Nieminen <nospam@thanks.invalid> - 2021-10-22 04:48 +0000
    Re: I think references should have been const by default Manfred <noname@add.invalid> - 2021-10-21 13:57 +0200
    Re: I think references should have been const by default Branimir Maksimovic <branimir.maksimovic@icloud.com> - 2021-10-21 21:27 +0000
    Re: I think references should have been const by default Jorgen Grahn <grahn+nntp@snipabacken.se> - 2021-10-24 14:20 +0000

Page 5 of 9 — ← Prev page 1 2 3 4 [5] 6 7 8 9  Next page →


#82111

FromJames Kuyper <jameskuyper@alumni.caltech.edu>
Date2021-10-26 11:22 -0400
Message-ID<sl96fa$7q9$1@dont-email.me>
In reply to#82103
On 10/26/21 10:42 AM, RacingRabbit@watershipdown.co.uk wrote:
> On Tue, 26 Oct 2021 10:31:41 -0400
> James Kuyper <jameskuyper@alumni.caltech.edu> wrote:
>> On 10/26/21 4:18 AM, RacingRabbit@watershipdown.co.uk wrote:
>>> On Mon, 25 Oct 2021 13:14:30 -0400
>>> James Kuyper <jameskuyper@alumni.caltech.edu> wrote:
>>>> On 10/25/21 12:14 PM, RacingRabbit@watershipdown.co.uk wrote:
>> ....
>>>>> ... It is implicit that its read only in C because
>>>>> C also provides the following initialisation which places the string 
>>>>> (presumably) on the heap:
>>>>>
>>>>> char str[] = "hello world";
>>>>
>>>> Such code cannot result in the string being placed in read-only memory,
>>>> because it's perfectly legal to modify str. On the other hand, both of
>>>
>>> Yes, that was my point. [] means modifyable, * means read only in every
>>> C implementation I've ever used.
>>
>> Incorrect. In most declarations, [] means array, and * means pointer.
>> Neither one means "read only".
>> I think you may be thinking of a different fact that has nothing to do
>> with read-only memory. Within the scope of an identifier that identifies
> 
> No I'm not. The pointer will be pointing to a string literal in the program 
> static text area which is usually non modifiable.

Yes, I discussed that fact, which is the real reason for the bus error
you saw. It was not because you used * rather than [] in your
declaration of str.

>> Exception 1: it's not permitted to declare functions that take arrays as
>> arguments, 
> 
> Since when?

Since K&R C. As explained below, the following is NOT a counter example.

> fenris$ cat t.c
> #include <stdio.h>
> 
> void func(int a[2][3])
> {
> 	printf("%d\n",a[1][2]);

"A declaration of a parameter as "array of type" shall be adjusted to
"qualified pointer to type", where the type qualifiers (if any) are
those specified within the [ and ] of the array type derivation."
(6.7.63.p6).
There's an easy way you can test this. Declare func a second time, as
follows:

void func(int (*a)[3]);

Such redeclaration is permitted only if the new declaration is
compatible with the previous one. The "adjustment" described above makes
your declaration identical to the second one.


> }
> 
> 
> int main()
> {
> 	int a[2][3];
> 	a[1][2] = 123;
> 	func(a);

Appearances to the contrary notwithstanding, that code does NOT pass the
entire array a to func(). That's because:

"Except when it is the operand of the sizeof operator, or the unary &
operator, or is a string literal used to initialize an array, an
expression that has type "array of type" is converted to an expression
with type "pointer to type" that points to the initial element of the
array object and is not an lvalue." (6.3.2p3).

In the expression func(a), "a" is not the operand of the sizeof operator
or the unary & operator, and it is certainly not a string literal.
Therefore, a gets converted to &a[0]. Try it, add the following line to
your program:

     func(&a[0]);

It won't be diagnosed as an error, because &a[0] is a pointer to an
array of 3 ints, which precisely what the first argument of func() has
been declared to be (after the adjustments described above). It will
simply result in a second printing of "123".


> 	return 0;
> }
> fenris$ cc t.c; a.out
> 123

Neither of these features are new, they both date back to K&R C.

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


#82114

FromRacingRabbit@watershipdown.co.uk
Date2021-10-26 15:30 +0000
Message-ID<sl96ut$1a96$1@gioia.aioe.org>
In reply to#82111
On Tue, 26 Oct 2021 11:22:18 -0400
James Kuyper <jameskuyper@alumni.caltech.edu> wrote:
>On 10/26/21 10:42 AM, RacingRabbit@watershipdown.co.uk wrote:
>> No I'm not. The pointer will be pointing to a string literal in the program 
>> static text area which is usually non modifiable.
>
>Yes, I discussed that fact, which is the real reason for the bus error
>you saw. It was not because you used * rather than [] in your
>declaration of str.

Hello, we speak English on this group. Do. You. Understand. It?

>>> Exception 1: it's not permitted to declare functions that take arrays as
>>> arguments, 
>> 
>> Since when?
>
>Since K&R C. As explained below, the following is NOT a counter example.

Thats exactly what it is. Too bad it made you look stupid.

>"A declaration of a parameter as "array of type" shall be adjusted to
>"qualified pointer to type", where the type qualifiers (if any) are
>those specified within the [ and ] of the array type derivation."
>(6.7.63.p6).
>There's an easy way you can test this. Declare func a second time, as
>follows:
>
>void func(int (*a)[3]);

[hopeless effort at self justification]

You said arrays couldn't be declared as parameters. I showed you they could,
end of.  What the compiler does with it under the hood is irrelevant.

tl;dr

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


#82116

FromJames Kuyper <jameskuyper@alumni.caltech.edu>
Date2021-10-26 12:23 -0400
Message-ID<sl9a29$438$1@dont-email.me>
In reply to#82114
On 10/26/21 11:30 AM, RacingRabbit@watershipdown.co.uk wrote:
> On Tue, 26 Oct 2021 11:22:18 -0400
> James Kuyper <jameskuyper@alumni.caltech.edu> wrote:
...
>> "A declaration of a parameter as "array of type" shall be adjusted to
>> "qualified pointer to type", where the type qualifiers (if any) are
>> those specified within the [ and ] of the array type derivation."
>> (6.7.63.p6).
>> There's an easy way you can test this. Declare func a second time, as
>> follows:
>>
>> void func(int (*a)[3]);

Did you try inserting such a line? What were the results?

> [hopeless effort at self justification]
> 
> You said arrays couldn't be declared as parameters. 

No, I said "it's not permitted to declare functions that take arrays as
arguments, but it is permitted to declare a function parameter as if it
were an array."

Such a declaration does NOT declare the parameter to be an array, it
declares it to be a pointer. You've retained my citation of the part of
the standard that says so above. Here's a complete compilable program
demonstrating that rule:

    #include <stdio.h>

    static void func(int a[2][3])
    {
        printf("%s\n",
            _Generic(a, int[2][3]: "array", int(*)[3]: "pointer"));
    }

    int main(void)
    {
        int a[2][3];
        func(a);
    }

When I run that program, it says "pointer". What do you get when you run it?

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


#82118

FromJames Kuyper <jameskuyper@alumni.caltech.edu>
Date2021-10-26 12:51 -0400
Message-ID<sl9bme$hf5$1@dont-email.me>
In reply to#82116
On 10/26/21 12:23 PM, James Kuyper wrote:
...
> No, I said "it's not permitted to declare functions that take arrays as
> arguments, but it is permitted to declare a function parameter as if it
> were an array."
> 
> Such a declaration does NOT declare the parameter to be an array, it
> declares it to be a pointer. You've retained my citation of the part of
> the standard that says so above. Here's a complete compilable program
> demonstrating that rule:
> 
>     #include <stdio.h>
> 
>     static void func(int a[2][3])
>     {
>         printf("%s\n",
>             _Generic(a, int[2][3]: "array", int(*)[3]: "pointer"));]]][

Here's another test you can perform. If that declaration declares a to
be an array, the following assignment statement, inserted in the body of
func(), should be a constraint violation:

     int b[4][3];
     a = b;

The left side of an assignment cannot have array type. On my system,
those lines compiled without generating any diagnostics.

>     }

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


#82125

FromJames Kuyper <jameskuyper@alumni.caltech.edu>
Date2021-10-26 14:34 -0400
Message-ID<sl9hnb$uir$2@dont-email.me>
In reply to#82116
On 10/26/21 12:23 PM, James Kuyper wrote:
...
> No, I said "it's not permitted to declare functions that take arrays as
> arguments, but it is permitted to declare a function parameter as if it
> were an array."
> 
> Such a declaration does NOT declare the parameter to be an array, it
> declares it to be a pointer. You've retained my citation of the part of
> the standard that says so above. Here's a complete compilable program
> demonstrating that rule:
> 
>     #include <stdio.h>
> 
>     static void func(int a[2][3])
>     {
>         printf("%s\n",
>             _Generic(a, int[2][3]: "array", int(*)[3]: "pointer"));
>     }
> 
>     int main(void)
>     {
>         int a[2][3];
>         func(a);
>     }
> 
> When I run that program, it says "pointer". What do you get when you run it?

Unfortunately, that doesn't prove what I intended it to prove, because
even if a were an array, it would have been converted to a pointer when
passed to _Generic. That problem is not too difficult to work around, I
just have to use the '&' operator:

    #include <stdio.h>

    #define ARR_PTR(x) _Generic(&x, \
        int(*)[2][3]: "array", \
        int(**)[3]: "pointer", \
        default: "other")

    static void func(int a[2][3])
    {
        int b[2][3];
        int (*c)[3];
        printf("a:%s\n", ARR_PTR(a));
        printf("b:%s\n", ARR_PTR(b));
        printf("c:%s\n", ARR_PTR(c));
    }

    int main(void)
    {
        int a[2][3];
        func(a);
    }

I get the following output:
a:pointer
b:array
c:pointer

What do you get?

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


#82128

From"Chris M. Thomasson" <chris.m.thomasson.1@gmail.com>
Date2021-10-26 12:57 -0700
Message-ID<sl9mjo$ng$1@dont-email.me>
In reply to#82125
On 10/26/2021 11:34 AM, James Kuyper wrote:
> On 10/26/21 12:23 PM, James Kuyper wrote:
> ...
>> No, I said "it's not permitted to declare functions that take arrays as
>> arguments, but it is permitted to declare a function parameter as if it
>> were an array."
>>
>> Such a declaration does NOT declare the parameter to be an array, it
>> declares it to be a pointer. You've retained my citation of the part of
>> the standard that says so above. Here's a complete compilable program
>> demonstrating that rule:
>>
>>      #include <stdio.h>
>>
>>      static void func(int a[2][3])
>>      {
>>          printf("%s\n",
>>              _Generic(a, int[2][3]: "array", int(*)[3]: "pointer"));
>>      }
>>
>>      int main(void)
>>      {
>>          int a[2][3];
>>          func(a);
>>      }
>>
>> When I run that program, it says "pointer". What do you get when you run it?
> 
> Unfortunately, that doesn't prove what I intended it to prove, because
> even if a were an array, it would have been converted to a pointer when
> passed to _Generic. That problem is not too difficult to work around, I
> just have to use the '&' operator:
> 
>      #include <stdio.h>
> 
>      #define ARR_PTR(x) _Generic(&x, \
>          int(*)[2][3]: "array", \
>          int(**)[3]: "pointer", \
>          default: "other")
> 
>      static void func(int a[2][3])
>      {
>          int b[2][3];
>          int (*c)[3];
>          printf("a:%s\n", ARR_PTR(a));
>          printf("b:%s\n", ARR_PTR(b));
>          printf("c:%s\n", ARR_PTR(c));
>      }
> 
>      int main(void)
>      {
>          int a[2][3];
>          func(a);
>      }
> 
> I get the following output:
> a:pointer
> b:array
> c:pointer
> 
> What do you get?
> 

Fwiw, I get the same:

a:pointer
b:array
c:pointer

:^)

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


#82140

FromRacingRabbit@watershipdown.co.uk
Date2021-10-27 07:57 +0000
Message-ID<slb0pj$s2f$1@gioia.aioe.org>
In reply to#82116
On Tue, 26 Oct 2021 12:23:37 -0400
James Kuyper <jameskuyper@alumni.caltech.edu> wrote:
>On 10/26/21 11:30 AM, RacingRabbit@watershipdown.co.uk wrote:
>> You said arrays couldn't be declared as parameters. 
>
>No, I said "it's not permitted to declare functions that take arrays as
>arguments, but it is permitted to declare a function parameter as if it
>were an array."

There is no difference. As I said, what the compiler does with it under the
hood is not the point. The syntax declares an array.

>When I run that program, it says "pointer". What do you get when you run it?

Same. Not the point, its declared as an array.

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


#82141

FromJuha Nieminen <nospam@thanks.invalid>
Date2021-10-27 08:47 +0000
Message-ID<slb3nc$8i9$1@gioia.aioe.org>
In reply to#82140
RacingRabbit@watershipdown.co.uk wrote:
> On Tue, 26 Oct 2021 12:23:37 -0400
> James Kuyper <jameskuyper@alumni.caltech.edu> wrote:
>>On 10/26/21 11:30 AM, RacingRabbit@watershipdown.co.uk wrote:
>>> You said arrays couldn't be declared as parameters. 
>>
>>No, I said "it's not permitted to declare functions that take arrays as
>>arguments, but it is permitted to declare a function parameter as if it
>>were an array."
> 
> There is no difference. As I said, what the compiler does with it under the
> hood is not the point. The syntax declares an array.

No, it doesn't. It declares a pointer. What do you think this will print?

#include <stdio.h>

void foo(int array[10])
{
    printf("foo: sizeof(array) = %lu\n", sizeof(array));
}

int main()
{
    int array[10];
    int *ptr = array;
    printf("main: sizeof(array) = %lu\n", sizeof(array));
    printf("main: sizeof(ptr) = %lu\n", sizeof(ptr));
    foo(array);
}

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


#82143

FromJohnnyCameLater@whatsthetime.net
Date2021-10-27 14:29 +0000
Message-ID<slbnnk$9cl$1@gioia.aioe.org>
In reply to#82141
On Wed, 27 Oct 2021 08:47:42 -0000 (UTC)
Juha Nieminen <nospam@thanks.invalid> wrote:
>RacingRabbit@watershipdown.co.uk wrote:
>> On Tue, 26 Oct 2021 12:23:37 -0400
>> James Kuyper <jameskuyper@alumni.caltech.edu> wrote:
>>>On 10/26/21 11:30 AM, RacingRabbit@watershipdown.co.uk wrote:
>>>> You said arrays couldn't be declared as parameters. 
>>>
>>>No, I said "it's not permitted to declare functions that take arrays as
>>>arguments, but it is permitted to declare a function parameter as if it
>>>were an array."
>> 
>> There is no difference. As I said, what the compiler does with it under the
>> hood is not the point. The syntax declares an array.
>
>No, it doesn't. It declares a pointer. What do you think this will print?

Which parts of "syntax" and "under the hood" is confusing you. Perhaps in your 
own language?

"syntaksi"
"konepellin alla"

Any clearer?

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


#82158

FromJuha Nieminen <nospam@thanks.invalid>
Date2021-10-28 05:17 +0000
Message-ID<sldbq0$1eol$1@gioia.aioe.org>
In reply to#82143
JohnnyCameLater@whatsthetime.net wrote:
> On Wed, 27 Oct 2021 08:47:42 -0000 (UTC)
> Juha Nieminen <nospam@thanks.invalid> wrote:
>>RacingRabbit@watershipdown.co.uk wrote:
>>> On Tue, 26 Oct 2021 12:23:37 -0400
>>> James Kuyper <jameskuyper@alumni.caltech.edu> wrote:
>>>>On 10/26/21 11:30 AM, RacingRabbit@watershipdown.co.uk wrote:
>>>>> You said arrays couldn't be declared as parameters. 
>>>>
>>>>No, I said "it's not permitted to declare functions that take arrays as
>>>>arguments, but it is permitted to declare a function parameter as if it
>>>>were an array."
>>> 
>>> There is no difference. As I said, what the compiler does with it under the
>>> hood is not the point. The syntax declares an array.
>>
>>No, it doesn't. It declares a pointer. What do you think this will print?
> 
> Which parts of "syntax" and "under the hood" is confusing you. Perhaps in your 
> own language?

And which part of "an array and a pointer are different things" do you not
understand?

The function is *not* taking an array. It's taking a pointer. This is not just
"it's taking a pointer under the hood". It's taking a pointer with respect to
C syntax. Just because there are several alternative syntaxes to specify the
type of pointer doesn't matter. It's still a pointer. Not just in its
underlying representation, but at the language syntax level. These three
declarations are identical and mean the same thing, they are merely using
alternative syntaxes to express the same thing:

  void foo(int *ptr) {}
  void foo(int ptr[]) {}
  void foo(int ptr[10]) {}

C++ supports function overloading. However, if you try to do the above in C++
you'll get redefinition errors, because all three are identical.

Contrast that with, for example:

  void foo(int *ptr) {}
  void foo(int &ptr) {}

Those two might result in identical binaries under the hood, but they are
syntactically different, and will not cause a redefinition error.

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


#82162

FromJohnnyCameLater@whatsthetime.net
Date2021-10-28 09:30 +0000
Message-ID<sldqio$152h$1@gioia.aioe.org>
In reply to#82158
On Thu, 28 Oct 2021 05:17:54 -0000 (UTC)
Juha Nieminen <nospam@thanks.invalid> wrote:
>JohnnyCameLater@whatsthetime.net wrote:
>> On Wed, 27 Oct 2021 08:47:42 -0000 (UTC)
>> Juha Nieminen <nospam@thanks.invalid> wrote:
>>>RacingRabbit@watershipdown.co.uk wrote:
>>>> On Tue, 26 Oct 2021 12:23:37 -0400
>>>> James Kuyper <jameskuyper@alumni.caltech.edu> wrote:
>>>>>On 10/26/21 11:30 AM, RacingRabbit@watershipdown.co.uk wrote:
>>>>>> You said arrays couldn't be declared as parameters. 
>>>>>
>>>>>No, I said "it's not permitted to declare functions that take arrays as
>>>>>arguments, but it is permitted to declare a function parameter as if it
>>>>>were an array."
>>>> 
>>>> There is no difference. As I said, what the compiler does with it under the
>
>>>> hood is not the point. The syntax declares an array.
>>>
>>>No, it doesn't. It declares a pointer. What do you think this will print?
>> 
>> Which parts of "syntax" and "under the hood" is confusing you. Perhaps in
>your 
>> own language?
>
>And which part of "an array and a pointer are different things" do you not
>understand?

Ok, you're either just plain thick or you're trolling now.

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


#82168

FromJuha Nieminen <nospam@thanks.invalid>
Date2021-10-29 04:47 +0000
Message-ID<slfudl$6ag$1@gioia.aioe.org>
In reply to#82162
JohnnyCameLater@whatsthetime.net wrote:
>>And which part of "an array and a pointer are different things" do you not
>>understand?
> 
> Ok, you're either just plain thick or you're trolling now.

I'll take that as a concession. You know you are wrong and have no response.

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


#82170

FromJuha Nieminen <nospam@thanks.invalid>
Date2021-10-29 05:11 +0000
Message-ID<slfvqn$isl$1@gioia.aioe.org>
In reply to#82162
JohnnyCameLater@whatsthetime.net wrote:
>>And which part of "an array and a pointer are different things" do you not
>>understand?
> 
> Ok, you're either just plain thick or you're trolling now.

Btw, I would warmly recommend that you do some self reflection.

Ask yourself: *Why* are you just dodging the questions presented to you,
and instead just throwing accusations and belittlement instead? If you were
right, you wouldn't have to, and instead you could present arguments to
what's actually said to you. Instead, you just dodge and throw insults.

I think you know that you messed up, and now just stubborningly refuse
to acknowledge it, or even to simply stop. Ask yourself why that's so,
and whether that's actually something you really want to do.

(Of course you will not do any of that. At least not right now. I'm
just hoping that at some point in the future you'll start doing so.)

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


#82172

FromJohnnyCameLater@whatsthetime.net
Date2021-10-29 08:40 +0000
Message-ID<slgc1e$16vc$1@gioia.aioe.org>
In reply to#82170
On Fri, 29 Oct 2021 05:11:53 -0000 (UTC)
Juha Nieminen <nospam@thanks.invalid> wrote:
>JohnnyCameLater@whatsthetime.net wrote:
>>>And which part of "an array and a pointer are different things" do you not
>>>understand?
>> 
>> Ok, you're either just plain thick or you're trolling now.
>
>Btw, I would warmly recommend that you do some self reflection.

Says Mr Depressive Aspie. Irony, much?

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


#82185

FromJuha Nieminen <nospam@thanks.invalid>
Date2021-11-01 06:15 +0000
Message-ID<slo0li$uqe$2@gioia.aioe.org>
In reply to#82172
JohnnyCameLater@whatsthetime.net wrote:
> On Fri, 29 Oct 2021 05:11:53 -0000 (UTC)
> Juha Nieminen <nospam@thanks.invalid> wrote:
>>JohnnyCameLater@whatsthetime.net wrote:
>>>>And which part of "an array and a pointer are different things" do you not
>>>>understand?
>>> 
>>> Ok, you're either just plain thick or you're trolling now.
>>
>>Btw, I would warmly recommend that you do some self reflection.
> 
> Says Mr Depressive Aspie. Irony, much?

I still recommend that you think a bit about why you feel the need to insult
people.

When someone challenges your assertion, and you just respond with an insult,
then you should think about why you are doing that.

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


#82142

FromDavid Brown <david.brown@hesbynett.no>
Date2021-10-27 11:07 +0200
Message-ID<slb4ro$rn3$1@dont-email.me>
In reply to#82140
On 27/10/2021 09:57, RacingRabbit@watershipdown.co.uk wrote:
> On Tue, 26 Oct 2021 12:23:37 -0400
> James Kuyper <jameskuyper@alumni.caltech.edu> wrote:
>> On 10/26/21 11:30 AM, RacingRabbit@watershipdown.co.uk wrote:
>>> You said arrays couldn't be declared as parameters. 
>>
>> No, I said "it's not permitted to declare functions that take arrays as
>> arguments, but it is permitted to declare a function parameter as if it
>> were an array."
> 
> There is no difference. As I said, what the compiler does with it under the
> hood is not the point. The syntax declares an array.
> 
>> When I run that program, it says "pointer". What do you get when you run it?
> 
> Same. Not the point, its declared as an array.
> 

Do you have trouble understanding the difference between an array, and a
pointer to the first element of the array?

C arrays are /never/ passed to functions as parameters, nor are they
used directly in most expressions.  (You can pass a struct that contains
an array as a field, but that's a struct, not an array.)  It is a major
inconsistency in the type system of C, but one that works well in practice.

Do you know the difference between :

	int ar1[10];

and

	std::array<int, 10> ar2;

and how these may be passed to functions?

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


#82144

FromJohnnyCameLater@whatsthetime.net
Date2021-10-27 14:30 +0000
Message-ID<slbnqf$bft$1@gioia.aioe.org>
In reply to#82142
On Wed, 27 Oct 2021 11:07:03 +0200
David Brown <david.brown@hesbynett.no> wrote:
>On 27/10/2021 09:57, RacingRabbit@watershipdown.co.uk wrote:
>> On Tue, 26 Oct 2021 12:23:37 -0400
>> James Kuyper <jameskuyper@alumni.caltech.edu> wrote:
>>> On 10/26/21 11:30 AM, RacingRabbit@watershipdown.co.uk wrote:
>>>> You said arrays couldn't be declared as parameters. 
>>>
>>> No, I said "it's not permitted to declare functions that take arrays as
>>> arguments, but it is permitted to declare a function parameter as if it
>>> were an array."
>> 
>> There is no difference. As I said, what the compiler does with it under the
>> hood is not the point. The syntax declares an array.
>> 
>>> When I run that program, it says "pointer". What do you get when you run it?
>
>> 
>> Same. Not the point, its declared as an array.
>> 
>
>Do you have trouble understanding the difference between an array, and a
>pointer to the first element of the array?

Do you have trouble understanding plain English? The syntax declares an array,
the fact the compiler converts that into a pointer isn't the point. Pun
intended.

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


#82145

FromDavid Brown <david.brown@hesbynett.no>
Date2021-10-27 17:30 +0200
Message-ID<slbrb3$7n9$1@dont-email.me>
In reply to#82144
On 27/10/2021 16:30, JohnnyCameLater@whatsthetime.net wrote:
> On Wed, 27 Oct 2021 11:07:03 +0200
> David Brown <david.brown@hesbynett.no> wrote:
>> On 27/10/2021 09:57, RacingRabbit@watershipdown.co.uk wrote:
>>> On Tue, 26 Oct 2021 12:23:37 -0400
>>> James Kuyper <jameskuyper@alumni.caltech.edu> wrote:
>>>> On 10/26/21 11:30 AM, RacingRabbit@watershipdown.co.uk wrote:
>>>>> You said arrays couldn't be declared as parameters. 
>>>>
>>>> No, I said "it's not permitted to declare functions that take arrays as
>>>> arguments, but it is permitted to declare a function parameter as if it
>>>> were an array."
>>>
>>> There is no difference. As I said, what the compiler does with it under the
>>> hood is not the point. The syntax declares an array.
>>>
>>>> When I run that program, it says "pointer". What do you get when you run it?
>>
>>>
>>> Same. Not the point, its declared as an array.
>>>
>>
>> Do you have trouble understanding the difference between an array, and a
>> pointer to the first element of the array?
> 
> Do you have trouble understanding plain English? The syntax declares an array,
> the fact the compiler converts that into a pointer isn't the point. Pun
> intended.
> 

I don't know whether you are trolling, or if you are simply so arrogant
that you would rather stay ignorant and insult people than admit to
making a mistake and appreciate the help and advice you are given.
Either way, feel free to come back with questions once you have grown up
a little, and feel free to stay away until that day.

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


#82148

FromJohnnyCameLater@whatsthetime.net
Date2021-10-27 15:46 +0000
Message-ID<slbs8c$quc$1@gioia.aioe.org>
In reply to#82145
On Wed, 27 Oct 2021 17:30:43 +0200
David Brown <david.brown@hesbynett.no> wrote:
>On 27/10/2021 16:30, JohnnyCameLater@whatsthetime.net wrote:
>> On Wed, 27 Oct 2021 11:07:03 +0200
>> David Brown <david.brown@hesbynett.no> wrote:
>>> On 27/10/2021 09:57, RacingRabbit@watershipdown.co.uk wrote:
>>>> On Tue, 26 Oct 2021 12:23:37 -0400
>>>> James Kuyper <jameskuyper@alumni.caltech.edu> wrote:
>>>>> On 10/26/21 11:30 AM, RacingRabbit@watershipdown.co.uk wrote:
>>>>>> You said arrays couldn't be declared as parameters. 
>>>>>
>>>>> No, I said "it's not permitted to declare functions that take arrays as
>>>>> arguments, but it is permitted to declare a function parameter as if it
>>>>> were an array."
>>>>
>>>> There is no difference. As I said, what the compiler does with it under the
>
>>>> hood is not the point. The syntax declares an array.
>>>>
>>>>> When I run that program, it says "pointer". What do you get when you run
>it?
>>>
>>>>
>>>> Same. Not the point, its declared as an array.
>>>>
>>>
>>> Do you have trouble understanding the difference between an array, and a
>>> pointer to the first element of the array?
>> 
>> Do you have trouble understanding plain English? The syntax declares an
>array,
>> the fact the compiler converts that into a pointer isn't the point. Pun
>> intended.
>> 
>
>I don't know whether you are trolling, or if you are simply so arrogant

Pot -> kettle.

>that you would rather stay ignorant and insult people than admit to
>making a mistake and appreciate the help and advice you are given.
>Either way, feel free to come back with questions once you have grown up
>a little, and feel free to stay away until that day.

Go fuck yourself you patronising jerk.

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


#82151

Fromscott@slp53.sl.home (Scott Lurndal)
Date2021-10-27 16:13 +0000
Message-ID<UUeeJ.1173$I%1.74@fx36.iad>
In reply to#82145
David Brown <david.brown@hesbynett.no> writes:
>On 27/10/2021 16:30, JohnnyCameLater@whatsthetime.net wrote:

>>> On 27/10/2021 09:57, RacingRabbit@watershipdown.co.uk wrote:

>I don't know whether you are trolling, 

Given the choice of nyms,and the  name changes, my assumption has
been trolling.   Best to simply ignore such posts.

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


Page 5 of 9 — ← Prev page 1 2 3 4 [5] 6 7 8 9  Next page →

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


csiph-web