Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. The Lounge
  3. I was going to write an article about how pointers aren't confusing

I was going to write an article about how pointers aren't confusing

Scheduled Pinned Locked Moved The Lounge
json
54 Posts 26 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • H honey the codewitch

    Until I realized in the process of trying to explain them that they probably are. Just because I find something intuitive doesn't mean I can make it intuitive to others. :doh: The secret with pointers is to enjoy the freedom they bring you rather than fearing the danger they present. Aside from that, the rest is details.

    Real programmers use butterflies

    L Offline
    L Offline
    Lost User
    wrote on last edited by
    #14

    That points me to.... ääähm.... no can't explain it ;)

    It does not solve my Problem, but it answers my question Chemists have exactly one rule: there are only exceptions

    1 Reply Last reply
    0
    • D dandy72

      ...and that, right there, is pretty much all you need to know. For some reason I was overthinking the whole thing when I started learning about them. And it's only like 2 years into college that I finally wrapped my head around the whole, basic, fundamental idea. Never had a problem with them since. That being said, I haven't done anything pointer-related in over a decade...

      H Offline
      H Offline
      honey the codewitch
      wrote on last edited by
      #15

      I think that's a common trap. It doesn't help that misusing them causes faults because I think that makes them intimidating but all a fault is is an unhandled exception. Fear is a huge stumbling block to growth. It doesn't help that I've seen lots of articles (not necessarily here) rag on pointers and state that they're scary in so many words, probably from authors that never got comfortable with them themselves. A lot of times it's no different than accessing an array.

      Real programmers use butterflies

      M 1 Reply Last reply
      0
      • L Lost User

        Au contraire printers are very confusing. ;P

        R Offline
        R Offline
        raddevus
        wrote on last edited by
        #16

        If you ever PCL, then you know...blech! X|

        1 Reply Last reply
        0
        • H honey the codewitch

          Until I realized in the process of trying to explain them that they probably are. Just because I find something intuitive doesn't mean I can make it intuitive to others. :doh: The secret with pointers is to enjoy the freedom they bring you rather than fearing the danger they present. Aside from that, the rest is details.

          Real programmers use butterflies

          A Offline
          A Offline
          Amarnath S
          wrote on last edited by
          #17

          The most famous pointer of them all is ... Google. How? Well, given a search string, Google points us to the location(s), meaning website(s), where that search string is present. Agree?

          J H 2 Replies Last reply
          0
          • A Amarnath S

            The most famous pointer of them all is ... Google. How? Well, given a search string, Google points us to the location(s), meaning website(s), where that search string is present. Agree?

            J Offline
            J Offline
            Johnny J
            wrote on last edited by
            #18

            Amarnath S wrote:

            Well, given a search string, Google points us to the location(s), meaning website(s), where that search string is present. Agree?

            If you're lucky... :doh:

            Anything that is unrelated to elephants is irrelephant
            Anonymous
            -----
            The problem with quotes on the internet is that you can never tell if they're genuine
            Winston Churchill, 1944
            -----
            Never argue with a fool. Onlookers may not be able to tell the difference.
            Mark Twain

            1 Reply Last reply
            0
            • A Amarnath S

              The most famous pointer of them all is ... Google. How? Well, given a search string, Google points us to the location(s), meaning website(s), where that search string is present. Agree?

              H Offline
              H Offline
              honey the codewitch
              wrote on last edited by
              #19

              I'd say the links it returns are the pointers, but you do you. :)

              Real programmers use butterflies

              D 1 Reply Last reply
              0
              • H honey the codewitch

                What's so confusing about them? They point to a memory location. Think of an address as an index into a big array of bytes. No big. =)

                Real programmers use butterflies

                Mike HankeyM Offline
                Mike HankeyM Offline
                Mike Hankey
                wrote on last edited by
                #20

                Pointers are powerful and easy to use can lead to disaster when not used correctly, as can be seen when trying to debug a pointer problem.

                I'm not sure how many cookies it makes to be happy, but so far it's not 27. JaxCoder.com

                H U 2 Replies Last reply
                0
                • Mike HankeyM Mike Hankey

                  Pointers are powerful and easy to use can lead to disaster when not used correctly, as can be seen when trying to debug a pointer problem.

                  I'm not sure how many cookies it makes to be happy, but so far it's not 27. JaxCoder.com

                  H Offline
                  H Offline
                  honey the codewitch
                  wrote on last edited by
                  #21

                  Yeah. There is that. It's easier to use them correctly though if you understand them intuitively. These days most of my pointer problems are caused by things i forget to initialize. :doh:

                  Real programmers use butterflies

                  1 Reply Last reply
                  0
                  • H honey the codewitch

                    I'd say the links it returns are the pointers, but you do you. :)

                    Real programmers use butterflies

                    D Offline
                    D Offline
                    Daniel Pfeffer
                    wrote on last edited by
                    #22

                    honey the codewitch wrote:

                    links it returns are the pointers

                    So is Google a pointer factory, or a pointer dictionary?

                    Freedom is the freedom to say that two plus two make four. If that is granted, all else follows. -- 6079 Smith W.

                    H 1 Reply Last reply
                    0
                    • D Daniel Pfeffer

                      honey the codewitch wrote:

                      links it returns are the pointers

                      So is Google a pointer factory, or a pointer dictionary?

                      Freedom is the freedom to say that two plus two make four. If that is granted, all else follows. -- 6079 Smith W.

                      H Offline
                      H Offline
                      honey the codewitch
                      wrote on last edited by
                      #23

                      That's a fantastic question. :-D

                      Real programmers use butterflies

                      1 Reply Last reply
                      0
                      • H honey the codewitch

                        Until I realized in the process of trying to explain them that they probably are. Just because I find something intuitive doesn't mean I can make it intuitive to others. :doh: The secret with pointers is to enjoy the freedom they bring you rather than fearing the danger they present. Aside from that, the rest is details.

                        Real programmers use butterflies

                        F Offline
                        F Offline
                        Forogar
                        wrote on last edited by
                        #24

                        How hard can a pointer be? It points to a chunk of memory with stuff in it. Keep that fundamental concept in mind at all times and you shouldn't have any problems.

                        - I would love to change the world, but they won’t give me the source code.

                        1 Reply Last reply
                        0
                        • H honey the codewitch

                          Until I realized in the process of trying to explain them that they probably are. Just because I find something intuitive doesn't mean I can make it intuitive to others. :doh: The secret with pointers is to enjoy the freedom they bring you rather than fearing the danger they present. Aside from that, the rest is details.

                          Real programmers use butterflies

                          M Offline
                          M Offline
                          Marc Clifton
                          wrote on last edited by
                          #25

                          honey the codewitch wrote:

                          to enjoy the freedom they bring you rather than fearing the danger they present.

                          True for so many things! :laugh:

                          Latest Articles:
                          Thread Safe Quantized Temporal Frame Ring Buffer

                          1 Reply Last reply
                          0
                          • M Maximilien

                            They're not confusing at all. ( I removed the link ) use the wikipedia instead : [Pointer (dog breed) - Wikipedia](https://en.wikipedia.org/wiki/Pointer\_(dog\_breed))

                            I'd rather be phishing!

                            N Offline
                            N Offline
                            Nelek
                            wrote on last edited by
                            #26

                            My antivirus started to ring bells with that link. Just in case, don't visit it. https://static.searchiq.cc/js/2.2.57/sa.js Name of the thread: JS:Trojan.JS.Downloader.DOY Really sad if we can't trust the links of other old CPians in the lounge to webs that shouldn't be dangerous :sigh: :sigh: :sigh:

                            M.D.V. ;) If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about? Help me to understand what I'm saying, and I'll explain it better to you Rating helpful answers is nice, but saying thanks can be even nicer.

                            M 1 Reply Last reply
                            0
                            • H honey the codewitch

                              Until I realized in the process of trying to explain them that they probably are. Just because I find something intuitive doesn't mean I can make it intuitive to others. :doh: The secret with pointers is to enjoy the freedom they bring you rather than fearing the danger they present. Aside from that, the rest is details.

                              Real programmers use butterflies

                              S Offline
                              S Offline
                              Southmountain
                              wrote on last edited by
                              #27

                              look forward to see your this article!:rose:

                              diligent hands rule....

                              1 Reply Last reply
                              0
                              • H honey the codewitch

                                Until I realized in the process of trying to explain them that they probably are. Just because I find something intuitive doesn't mean I can make it intuitive to others. :doh: The secret with pointers is to enjoy the freedom they bring you rather than fearing the danger they present. Aside from that, the rest is details.

                                Real programmers use butterflies

                                C Offline
                                C Offline
                                CPallini
                                wrote on last edited by
                                #28

                                Pointers are evil... ...evil is fun.

                                "In testa che avete, Signor di Ceprano?" -- Rigoletto

                                H 1 Reply Last reply
                                0
                                • C CPallini

                                  Pointers are evil... ...evil is fun.

                                  "In testa che avete, Signor di Ceprano?" -- Rigoletto

                                  H Offline
                                  H Offline
                                  honey the codewitch
                                  wrote on last edited by
                                  #29

                                  But they're so cute and cuddly. Especially my precious little void*. Who's a good little typeless pointer? YOU ARE!

                                  Real programmers use butterflies

                                  C 1 Reply Last reply
                                  0
                                  • N Nelek

                                    My antivirus started to ring bells with that link. Just in case, don't visit it. https://static.searchiq.cc/js/2.2.57/sa.js Name of the thread: JS:Trojan.JS.Downloader.DOY Really sad if we can't trust the links of other old CPians in the lounge to webs that shouldn't be dangerous :sigh: :sigh: :sigh:

                                    M.D.V. ;) If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about? Help me to understand what I'm saying, and I'll explain it better to you Rating helpful answers is nice, but saying thanks can be even nicer.

                                    M Offline
                                    M Offline
                                    Maximilien
                                    wrote on last edited by
                                    #30

                                    weird, it passed out over zealous web nanny on my office computer. I removed the link and put the wikipedia link instead. :thumbsup:

                                    I'd rather be phishing!

                                    N 1 Reply Last reply
                                    0
                                    • H honey the codewitch

                                      Until I realized in the process of trying to explain them that they probably are. Just because I find something intuitive doesn't mean I can make it intuitive to others. :doh: The secret with pointers is to enjoy the freedom they bring you rather than fearing the danger they present. Aside from that, the rest is details.

                                      Real programmers use butterflies

                                      Sander RosselS Offline
                                      Sander RosselS Offline
                                      Sander Rossel
                                      wrote on last edited by
                                      #31

                                      I guess your article should point that out ;p

                                      Best, Sander Azure DevOps Succinctly (free eBook) Azure Serverless Succinctly (free eBook) Migrating Apps to the Cloud with Azure arrgh.js - Bringing LINQ to JavaScript

                                      1 Reply Last reply
                                      0
                                      • H honey the codewitch

                                        But they're so cute and cuddly. Especially my precious little void*. Who's a good little typeless pointer? YOU ARE!

                                        Real programmers use butterflies

                                        C Offline
                                        C Offline
                                        CPallini
                                        wrote on last edited by
                                        #32

                                        Quote:

                                        Especially my precious little void*

                                        No, that's the Mother Of All The Evil, and your really don't need it in C++.

                                        "In testa che avete, Signor di Ceprano?" -- Rigoletto

                                        1 Reply Last reply
                                        0
                                        • Mike HankeyM Mike Hankey

                                          Pointers are powerful and easy to use can lead to disaster when not used correctly, as can be seen when trying to debug a pointer problem.

                                          I'm not sure how many cookies it makes to be happy, but so far it's not 27. JaxCoder.com

                                          U Offline
                                          U Offline
                                          User 13269747
                                          wrote on last edited by
                                          #33

                                          Quote:

                                          Pointers are powerful and easy to use can lead to disaster when not used correctly, as can be seen when trying to debug a pointer problem.

                                          Anyone trying to debug pointer problems without using valgrind is probably a masochist.

                                          Mike HankeyM 1 Reply Last reply
                                          0
                                          Reply
                                          • Reply as topic
                                          Log in to reply
                                          • Oldest to Newest
                                          • Newest to Oldest
                                          • Most Votes


                                          • Login

                                          • Don't have an account? Register

                                          • Login or register to search.
                                          • First post
                                            Last post
                                          0
                                          • Categories
                                          • Recent
                                          • Tags
                                          • Popular
                                          • World
                                          • Users
                                          • Groups