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. Appoint help: [modified]

Appoint help: [modified]

Scheduled Pinned Locked Moved C / C++ / MFC
helpquestion
11 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.
  • H Offline
    H Offline
    Hakan Bulut
    wrote on last edited by
    #1

    I have to appoint an integer variable to another integer pointer itself. I tried this: sNumber& DrawNumber() //pointer itself. { sNumber* pNum = new sNumber; pNum->i1 = edi1; pNum->i2 = edi2; } sNumber& sn = DrawNumber(); for(int i=0; i<2; i++) { int x1 = sn.pNum[i]; int x2 = sn.pNum[i]; } How much its right or wrong? have you got other any bookmarks on this topic? I have no possibility to compile this codes. -- modified at 13:28 Wednesday 14th November, 2007

    Was is das¿

    J M 2 Replies Last reply
    0
    • H Hakan Bulut

      I have to appoint an integer variable to another integer pointer itself. I tried this: sNumber& DrawNumber() //pointer itself. { sNumber* pNum = new sNumber; pNum->i1 = edi1; pNum->i2 = edi2; } sNumber& sn = DrawNumber(); for(int i=0; i<2; i++) { int x1 = sn.pNum[i]; int x2 = sn.pNum[i]; } How much its right or wrong? have you got other any bookmarks on this topic? I have no possibility to compile this codes. -- modified at 13:28 Wednesday 14th November, 2007

      Was is das¿

      J Offline
      J Offline
      Janzen
      wrote on last edited by
      #2

      I'm going to have to go with it is a lot wrong, but can't say where because I have no idea what you are asking.

      H 1 Reply Last reply
      0
      • H Hakan Bulut

        I have to appoint an integer variable to another integer pointer itself. I tried this: sNumber& DrawNumber() //pointer itself. { sNumber* pNum = new sNumber; pNum->i1 = edi1; pNum->i2 = edi2; } sNumber& sn = DrawNumber(); for(int i=0; i<2; i++) { int x1 = sn.pNum[i]; int x2 = sn.pNum[i]; } How much its right or wrong? have you got other any bookmarks on this topic? I have no possibility to compile this codes. -- modified at 13:28 Wednesday 14th November, 2007

        Was is das¿

        M Offline
        M Offline
        Mark Salsbery
        wrote on last edited by
        #3

        sNumber& DrawNumber() //pointer itself. What does "pointer itself" mean?  Your function returns a reference { sNumber* pNum = new sNumber; pNum->i1 = edi1; pNum->i2 = edi2; You need to return a value from the function. } sNumber& sn = DrawNumber(); for(int i=0; i<2; i++) The DrawNumber function (supposedly) returns a reference to a sNumber object. How can you iterate through an array of two objects?? { int x1 = sn.pNum[i]; int x2 = sn.pNum[i]; There's no such thing as "pNum" here. } Pretty much none of this makes sense :) Mark

        Mark Salsbery Microsoft MVP - Visual C++ :java:

        H 1 Reply Last reply
        0
        • J Janzen

          I'm going to have to go with it is a lot wrong, but can't say where because I have no idea what you are asking.

          H Offline
          H Offline
          Hakan Bulut
          wrote on last edited by
          #4

          Well abase... You are mean that it is impossible to appoint an integer variable to an integer pointer. Anyone can help me?

          Was is das¿

          L 1 Reply Last reply
          0
          • M Mark Salsbery

            sNumber& DrawNumber() //pointer itself. What does "pointer itself" mean?  Your function returns a reference { sNumber* pNum = new sNumber; pNum->i1 = edi1; pNum->i2 = edi2; You need to return a value from the function. } sNumber& sn = DrawNumber(); for(int i=0; i<2; i++) The DrawNumber function (supposedly) returns a reference to a sNumber object. How can you iterate through an array of two objects?? { int x1 = sn.pNum[i]; int x2 = sn.pNum[i]; There's no such thing as "pNum" here. } Pretty much none of this makes sense :) Mark

            Mark Salsbery Microsoft MVP - Visual C++ :java:

            H Offline
            H Offline
            Hakan Bulut
            wrote on last edited by
            #5

            Yeah how can i iterate thorough an array of two object. I just to mean that. So "sn" what has been refered to? What should i it to do? Can you help me? "The DrawNumber function (supposedly) returns a reference to a sNumber object." I can see it. Anyway I asked this question myself. I don't asking about this function does returns a reference to a sNumber object. [I just ask how can i appoint an integer variable to an integer pointer sn referred object.?] What do you say? it's no required? -- modified at 13:52 Wednesday 14th November, 2007

            Was is das¿

            M 1 Reply Last reply
            0
            • H Hakan Bulut

              Well abase... You are mean that it is impossible to appoint an integer variable to an integer pointer. Anyone can help me?

              Was is das¿

              L Offline
              L Offline
              led mike
              wrote on last edited by
              #6

              Hakan Bulut wrote:

              it is impossible to appoint an integer variable

              What does "appoint" mean? Are you in school? Did they teach you that word? It's wrong, it is not a standard term used in software development. You need to learn the proper terminology and use it for text based communications to succeed.

              M H 3 Replies Last reply
              0
              • H Hakan Bulut

                Yeah how can i iterate thorough an array of two object. I just to mean that. So "sn" what has been refered to? What should i it to do? Can you help me? "The DrawNumber function (supposedly) returns a reference to a sNumber object." I can see it. Anyway I asked this question myself. I don't asking about this function does returns a reference to a sNumber object. [I just ask how can i appoint an integer variable to an integer pointer sn referred object.?] What do you say? it's no required? -- modified at 13:52 Wednesday 14th November, 2007

                Was is das¿

                M Offline
                M Offline
                Mark Salsbery
                wrote on last edited by
                #7

                Hakan Bulut wrote:

                how can i iterate thorough an array of two object.

                You need to have that array to begin with. I'm not sure where to start here....this is really C/C++ fundamentals that I'm not sure if you know or not. Mark

                Mark Salsbery Microsoft MVP - Visual C++ :java:

                1 Reply Last reply
                0
                • L led mike

                  Hakan Bulut wrote:

                  it is impossible to appoint an integer variable

                  What does "appoint" mean? Are you in school? Did they teach you that word? It's wrong, it is not a standard term used in software development. You need to learn the proper terminology and use it for text based communications to succeed.

                  M Offline
                  M Offline
                  Mark Salsbery
                  wrote on last edited by
                  #8

                  led mike wrote:

                  What does "appoint" mean?

                  Right when I posted my first reply, I realized I forgot to ask that. :doh:

                  Mark Salsbery Microsoft MVP - Visual C++ :java:

                  1 Reply Last reply
                  0
                  • L led mike

                    Hakan Bulut wrote:

                    it is impossible to appoint an integer variable

                    What does "appoint" mean? Are you in school? Did they teach you that word? It's wrong, it is not a standard term used in software development. You need to learn the proper terminology and use it for text based communications to succeed.

                    H Offline
                    H Offline
                    Hakan Bulut
                    wrote on last edited by
                    #9

                    Sorry, I could not remember what was mean it in computers literature.

                    Was is das¿

                    L 1 Reply Last reply
                    0
                    • H Hakan Bulut

                      Sorry, I could not remember what was mean it in computers literature.

                      Was is das¿

                      L Offline
                      L Offline
                      led mike
                      wrote on last edited by
                      #10

                      Hakan Bulut wrote:

                      Sorry

                      how does that help?

                      Hakan Bulut wrote:

                      I could not remember

                      Then go find out first so you can use the correct terms when posting questions.

                      1 Reply Last reply
                      0
                      • L led mike

                        Hakan Bulut wrote:

                        it is impossible to appoint an integer variable

                        What does "appoint" mean? Are you in school? Did they teach you that word? It's wrong, it is not a standard term used in software development. You need to learn the proper terminology and use it for text based communications to succeed.

                        H Offline
                        H Offline
                        Hakan Bulut
                        wrote on last edited by
                        #11

                        Assingment.. I just to mean assing a variable to an integer pointer itself where in the sNumber structure and to objective oriented these elements to using easy?.. Have you got an idea OOP method?

                        Was is das¿

                        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