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. General Programming
  3. C / C++ / MFC
  4. pointer and address?

pointer and address?

Scheduled Pinned Locked Moved C / C++ / MFC
question
4 Posts 4 Posters 1 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.
  • D Offline
    D Offline
    dec82
    wrote on last edited by
    #1

    What the differences in these code : Write(address, size, data) Write( address, size , &data) The function basically write data into a address, with size is the size of the data to be written . Thanks

    C T C 3 Replies Last reply
    0
    • D dec82

      What the differences in these code : Write(address, size, data) Write( address, size , &data) The function basically write data into a address, with size is the size of the data to be written . Thanks

      C Offline
      C Offline
      Chris Losinger
      wrote on last edited by
      #2

      it's really hard to say what will happen without knowing what Write is expecting for that 3rd parameter. but, in general: C++ pointers[^]

      image processing toolkits | batch image processing

      1 Reply Last reply
      0
      • D dec82

        What the differences in these code : Write(address, size, data) Write( address, size , &data) The function basically write data into a address, with size is the size of the data to be written . Thanks

        T Offline
        T Offline
        ThatsAlok
        wrote on last edited by
        #3

        dec82 wrote:

        Write(address, size, data) Write( address, size , &data)

        What function defination says? or you have to consult the function writer... as it very difficult to predict, what actually your write function do.

        "Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
        Never mind - my own stupidity is the source of every "problem" - Mixture

        cheers, Alok Gupta VC Forum Q&A :- I/IV Support CRY- Child Relief and You

        1 Reply Last reply
        0
        • D dec82

          What the differences in these code : Write(address, size, data) Write( address, size , &data) The function basically write data into a address, with size is the size of the data to be written . Thanks

          C Online
          C Online
          CPallini
          wrote on last edited by
          #4

          Only one of the two is correct, unless data is declared as an array (i.e., for instance char data[8];).

          If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
          This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke
          [My articles]

          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