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. pcWife = (CWife *)pcFiancee;

pcWife = (CWife *)pcFiancee;

Scheduled Pinned Locked Moved The Lounge
question
37 Posts 22 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.
  • S Shaun Wilde

    surely the full algorithm is pcWife = (CWife*)pcFiancee; pcWife->Balance += pcHusband->Balance; pcHusband->Balance = 0; :)

    Stupidity dies. The end of future offspring. Evolution wins. - A Darwin Awards Haiku

    C Offline
    C Offline
    Christopher Duncan
    wrote on last edited by
    #22

    Of course, if you don't do this check first, if (IsValidPtr(pcWife, CWife)) { ... } then you'll experience symptoms of pcWife occasionally going wild and vectoring off into unreasonable territory. At such times, a fault is imminent, and it will always be yours. :-D Chistopher Duncan Author - The Career Programmer: Guerilla Tactics for an Imperfect World (Apress)

    1 Reply Last reply
    0
    • D Debs 0

      Congratulations. I holidayed in Boston several years back, so this is a tad out of date, but I really enjoyed going to the Museum of Fine Arts (or the MFA as it gets called). Some great Monets and a lovely place. Depends on your tastes of course. Also, the Faneuil (sp?) market is well worth a visit. Note: I was a tourist, so these may well be tourist-y places and the locals may come up with some alternatives, but I did enjoy both those places. Another tip: remember that your wife is *not* to be compared to a class instantiation and treat her like a human being, won't you??? :-O Contrary to what some people on this notice board may think we are actually of the same species... Debbie

      L Offline
      L Offline
      l a u r e n
      wrote on last edited by
      #23

      wowwwwww! u mean we're the same species as ... *points nervously* ... them??!!?? *gasps*


      "... and so i said to him ... if it don't dance (or code) and you can't eat it either f**k it or throw it away"
      biz stuff   about me

      L 1 Reply Last reply
      0
      • S Sam Woodward

        I suspect everyone has their own querks and habits when it comes to naming. As for me, I use 'p' for pointer, 'c' for class (and then i for ints, etc. etc... ok so that breaks down with pointers to chars but...) Thus is my code: int *piVal; // would be a pointer to an int CString cName; // would be not be a pointer to a string! CWife *pcWife; // would be a pointer to an instance of class 'CWife' If I had a pointer to a pointer to a class it would be 'ppc' etc. I find that not only does this help with knowing the type of a variable, but also keeps them grouped more helpfully in the Class/Memebrs pane in VisualStudio. S

        K Offline
        K Offline
        KaRl
        wrote on last edited by
        #24

        I have the same naming habits as yours, except for strings. When I use String objects I prefix with "str", and when using character arrays I prefix by "lpsz" So I came to find To end up this way Feeling like I'm God Feeling there's no way KoRn

        1 Reply Last reply
        0
        • L l a u r e n

          Michael P Butler wrote: do { sex --; love ++; }while(death_us_do_part) ummmmm surely that last line is: }while(!death_do_us_part) unless theres something ur not telling us :)


          "... and so i said to him ... if it don't dance (or code) and you can't eat it either f**k it or throw it away"
          biz stuff   about me

          K Offline
          K Offline
          KaRl
          wrote on last edited by
          #25

          Bugs are everywhere :) So I came to find To end up this way Feeling like I'm God Feeling there's no way KoRn

          1 Reply Last reply
          0
          • M Michael P Butler

            The obvious one do { sex --; love ++; }while(death_us_do_part) Michael "Time and tide melts the snowman." -- The Doctor (Doctor Who: Time and the Rani

            L Offline
            L Offline
            l a u r e n
            wrote on last edited by
            #26

            Michael P Butler wrote: do { sex --; love ++; }while(death_us_do_part) ummmmm surely that last line is: }while(!death_do_us_part) unless theres something ur not telling us :)


            "... and so i said to him ... if it don't dance (or code) and you can't eat it either f**k it or throw it away"
            biz stuff   about me

            K M T 3 Replies Last reply
            0
            • L l a u r e n

              Michael P Butler wrote: do { sex --; love ++; }while(death_us_do_part) ummmmm surely that last line is: }while(!death_do_us_part) unless theres something ur not telling us :)


              "... and so i said to him ... if it don't dance (or code) and you can't eat it either f**k it or throw it away"
              biz stuff   about me

              M Offline
              M Offline
              Michael P Butler
              wrote on last edited by
              #27

              Thanks for the code review. :-O I can't code for shit without a debugger to hand :-D Michael "Time and tide melts the snowman." -- The Doctor (Doctor Who: Time and the Rani

              1 Reply Last reply
              0
              • S Sam Woodward

                Sian and I will be running the following this weekend: pcWife = (CWife *)pcFiancee; :rose: Any wise advice from fellow CP folks? :laugh: S

                L Offline
                L Offline
                LukeV
                wrote on last edited by
                #28

                delete pcWife; ASSERT( pcWife ); Congradulations :-D --------------- Concentrating on Ideas http://www.edovia.com

                T 1 Reply Last reply
                0
                • C Christian Graus

                  I believe the other thing that is likely to happen to you soon is this->sexLife = NULL; Christian Hey, at least Logo had, at it's inception, a mechanical turtle. VB has always lacked even that... - Shog9 04-09-2002 During last 10 years, with invention of VB and similar programming environments, every ill-educated moron became able to develop software. - Alex E. - 12-Sept-2002

                  J Offline
                  J Offline
                  Jorgen Sigvardsson
                  wrote on last edited by
                  #29

                  I don't follow your logic here. He'll be able to get some every now and then! He won't get a wide variety, but it is sex. :) -- Giles wrote: You Scandinavians invaded my home land, like 1500 (+-500) years ago, and kept coming back for more. You should be ashamed of yourselves. Viking Tour, England, 15th July 563. Ticket price: £10 Sold out!

                  1 Reply Last reply
                  0
                  • L l a u r e n

                    Michael P Butler wrote: do { sex --; love ++; }while(death_us_do_part) ummmmm surely that last line is: }while(!death_do_us_part) unless theres something ur not telling us :)


                    "... and so i said to him ... if it don't dance (or code) and you can't eat it either f**k it or throw it away"
                    biz stuff   about me

                    T Offline
                    T Offline
                    Tomasz Sowinski
                    wrote on last edited by
                    #30

                    You should have some Sleep(28800) in the loop; otherwise the 'sex' variable will quickly go into negative area :) Tomasz Sowinski -- http://www.shooltz.com

                    *** Si fractum non sit, noli id reficere. ***

                    1 Reply Last reply
                    0
                    • L LukeV

                      delete pcWife; ASSERT( pcWife ); Congradulations :-D --------------- Concentrating on Ideas http://www.edovia.com

                      T Offline
                      T Offline
                      Tomasz Sowinski
                      wrote on last edited by
                      #31

                      VERIFY, not ASSERT. After all, they shouldn't spend their lives in debug configuration :) Tomasz Sowinski -- http://www.shooltz.com

                      *** Si fractum non sit, noli id reficere. ***

                      1 Reply Last reply
                      0
                      • L l a u r e n

                        wowwwwww! u mean we're the same species as ... *points nervously* ... them??!!?? *gasps*


                        "... and so i said to him ... if it don't dance (or code) and you can't eat it either f**k it or throw it away"
                        biz stuff   about me

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

                        lauren wrote: wowwwwww! u mean we're the same species as ... *points nervously* ... them??!!?? *gasps* I don't think so. I mean shopping, hairdressers, make-up, thousands of shoes... You lot must be a different breed completely. Michael Martin Australia mjm68@tpg.com.au "I personally love it because I can get as down and dirty as I want on the backend, while also being able to dabble with fun scripting and presentation games on the front end." - Chris Maunder 15/07/2002

                        1 Reply Last reply
                        0
                        • S Sam Woodward

                          Sian and I will be running the following this weekend: pcWife = (CWife *)pcFiancee; :rose: Any wise advice from fellow CP folks? :laugh: S

                          B Offline
                          B Offline
                          Brian Delahunty
                          wrote on last edited by
                          #33

                          Congratulations. I hope you have a good and enjoyable day. Regards, Brian Dela :-)

                          1 Reply Last reply
                          0
                          • S Sam Woodward

                            We will be honeymooning in New England. Is anyone here from the Boston area and if so can you recommend any "don't leave without seeing xyz..." type of things please? Thanks, S

                            N Offline
                            N Offline
                            nlecren
                            wrote on last edited by
                            #34

                            Don't leave without seeing the Big Dig project that left the city in ruin, You'll never complain about the quality of your roads again!

                            D 1 Reply Last reply
                            0
                            • S Sam Woodward

                              Sian and I will be running the following this weekend: pcWife = (CWife *)pcFiancee; :rose: Any wise advice from fellow CP folks? :laugh: S

                              T Offline
                              T Offline
                              Tim Lesher
                              wrote on last edited by
                              #35

                              Now does everyone see why experienced programmers say that C-style casts are inherently unsafe? ;-) Congratulations. Tim Lesher http://www.lesher.ws

                              1 Reply Last reply
                              0
                              • N nlecren

                                Don't leave without seeing the Big Dig project that left the city in ruin, You'll never complain about the quality of your roads again!

                                D Offline
                                D Offline
                                Debs 0
                                wrote on last edited by
                                #36

                                Which reminds me: Boston is by far the worst place I have ever driven. It was even worse than Paris...

                                1 Reply Last reply
                                0
                                • M Michael P Butler

                                  The obvious one do { sex --; love ++; }while(death_us_do_part) Michael "Time and tide melts the snowman." -- The Doctor (Doctor Who: Time and the Rani

                                  D Offline
                                  D Offline
                                  Debs 0
                                  wrote on last edited by
                                  #37

                                  Shouldn't that be while (!death_us_do_part) ?? Or are you encouraging some rather dubious (not to say illegal!!!!!) activities??

                                  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