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. Help an old programmer

Help an old programmer

Scheduled Pinned Locked Moved The Lounge
csharpc++wpfhelpios
20 Posts 8 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.
  • M Matthew Faithfull

    It sounds like all you need to do is to spend a little time reading some well written C++ source code and you'll pick up what you need pretty quickly. Download some articles from Code Project in a subject area you're interested enough in to read the code, or even one of mine, and find a style that suits you. There are many ways to write C++ from the definitely not recommended MFC style to the serious egg heads only Boost style. You can do as much as possible with template meta programming and end up with 20 lines of mind bending self referential complexity that is the entire program or lay out every minute procedural step just one level removed from doing it in assembly language. Sometimes a balance is best and sometimes a compromise is the worst of both worlds. The art of C++ is choosing the right way for the job in hand.

    "The secret of happiness is freedom, and the secret of freedom, courage." Thucydides (B.C. 460-400)

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

    Matthew Faithfull wrote:

    spend a little time reading some well written C++ source code

    It's the "well written" bit that's hard. There is just SO MUCH1 out there, finding something that is well formatted and not just a snipped to answer some question it a hard slog! I'm off to see what this Boost style's all about ;) Oh - and templates ain't where I want to be! I want to understand what I'm doing, but not continually have to go back and refactor as I learn better ways!

    MVVM # - I did it My Way ___________________________________________ Man, you're a god. - walterhevedeich 26/05/2011 .\\axxx (That's an 'M')

    1 Reply Last reply
    0
    • M Matthew Faithfull

      It sounds like all you need to do is to spend a little time reading some well written C++ source code and you'll pick up what you need pretty quickly. Download some articles from Code Project in a subject area you're interested enough in to read the code, or even one of mine, and find a style that suits you. There are many ways to write C++ from the definitely not recommended MFC style to the serious egg heads only Boost style. You can do as much as possible with template meta programming and end up with 20 lines of mind bending self referential complexity that is the entire program or lay out every minute procedural step just one level removed from doing it in assembly language. Sometimes a balance is best and sometimes a compromise is the worst of both worlds. The art of C++ is choosing the right way for the job in hand.

      "The secret of happiness is freedom, and the secret of freedom, courage." Thucydides (B.C. 460-400)

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

      Just skimmed a couple of your articles - really liked the patterns one btw. It does help looking at code like that - esp. as you put your braces in the "correct" position - and not on the same line as the function like some!

      MVVM # - I did it My Way ___________________________________________ Man, you're a god. - walterhevedeich 26/05/2011 .\\axxx (That's an 'M')

      M 1 Reply Last reply
      0
      • L Lost User

        Just skimmed a couple of your articles - really liked the patterns one btw. It does help looking at code like that - esp. as you put your braces in the "correct" position - and not on the same line as the function like some!

        MVVM # - I did it My Way ___________________________________________ Man, you're a god. - walterhevedeich 26/05/2011 .\\axxx (That's an 'M')

        M Offline
        M Offline
        Matthew Faithfull
        wrote on last edited by
        #13

        Thanks, I'm glad the correct bracketing is appreciated. That patterns article is well out of date though, please don't use the source directly, it should have a health warning. The style is alright from what I remember and the ideas are sound but I wrote it over 6 years ago and there are horrible bugs in the sample code. :-O A rewrite is due shortly but first I have to get the next QOR article finished which is based on the updated version of the same codebase. Enjoy your C++ :)

        "The secret of happiness is freedom, and the secret of freedom, courage." Thucydides (B.C. 460-400)

        1 Reply Last reply
        0
        • L Lost User

          Thanks Dave - I'll certainly take a look at the book.

          MVVM # - I did it My Way ___________________________________________ Man, you're a god. - walterhevedeich 26/05/2011 .\\axxx (That's an 'M')

          D Offline
          D Offline
          Dave Kerr
          wrote on last edited by
          #14

          No probs - have fun!

          My Blog: www.dwmkerr.com My Charity: Children's Homes Nepal

          1 Reply Last reply
          0
          • L Lost User

            I am an experienced programmer of many a language - most recently C#. I am attempting to write a program using Cocos2d-X (and, therefore, C++) (based loosely upon some existing code written in Cococs2d-iPhone (and, therefore, Objective C) Can someone recommend some site or book (of the cheap variety!) which will give me the'cheat sheet' version of C++ What I mean is, I don't want to sit down and learn C++ formally - I just want to look at how things "should be done" (e.g. what goes in .h and what in .cpp, are there such thing as interfaces - or do I just use base classes) preferably with a C# bent. I so far have found my development time to be 10% coding, 20% debugging and 70% Googling - so it would be nice to have one or two resources to hand rather than looking up each individual issue. thanks in advance for your kind help :rose:

            MVVM # - I did it My Way ___________________________________________ Man, you're a god. - walterhevedeich 26/05/2011 .\\axxx (That's an 'M')

            R Offline
            R Offline
            RichardGrimmer
            wrote on last edited by
            #15

            This might just help[^]

            C# has already designed away most of the tedium of C++.

            L 1 Reply Last reply
            0
            • L Lost User

              I am an experienced programmer of many a language - most recently C#. I am attempting to write a program using Cocos2d-X (and, therefore, C++) (based loosely upon some existing code written in Cococs2d-iPhone (and, therefore, Objective C) Can someone recommend some site or book (of the cheap variety!) which will give me the'cheat sheet' version of C++ What I mean is, I don't want to sit down and learn C++ formally - I just want to look at how things "should be done" (e.g. what goes in .h and what in .cpp, are there such thing as interfaces - or do I just use base classes) preferably with a C# bent. I so far have found my development time to be 10% coding, 20% debugging and 70% Googling - so it would be nice to have one or two resources to hand rather than looking up each individual issue. thanks in advance for your kind help :rose:

              MVVM # - I did it My Way ___________________________________________ Man, you're a god. - walterhevedeich 26/05/2011 .\\axxx (That's an 'M')

              A Offline
              A Offline
              AspDotNetDev
              wrote on last edited by
              #16

              The fast way.

              Thou mewling ill-breeding pignut!

              L 1 Reply Last reply
              0
              • L Lost User

                I am an experienced programmer of many a language - most recently C#. I am attempting to write a program using Cocos2d-X (and, therefore, C++) (based loosely upon some existing code written in Cococs2d-iPhone (and, therefore, Objective C) Can someone recommend some site or book (of the cheap variety!) which will give me the'cheat sheet' version of C++ What I mean is, I don't want to sit down and learn C++ formally - I just want to look at how things "should be done" (e.g. what goes in .h and what in .cpp, are there such thing as interfaces - or do I just use base classes) preferably with a C# bent. I so far have found my development time to be 10% coding, 20% debugging and 70% Googling - so it would be nice to have one or two resources to hand rather than looking up each individual issue. thanks in advance for your kind help :rose:

                MVVM # - I did it My Way ___________________________________________ Man, you're a god. - walterhevedeich 26/05/2011 .\\axxx (That's an 'M')

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

                C++ isn't a simple beast but I'm sure you know that. I could rattle on about header files for a good ten minuets. If you get really stuck, feel free to drop me an email

                L 1 Reply Last reply
                0
                • L Lost User

                  C++ isn't a simple beast but I'm sure you know that. I could rattle on about header files for a good ten minuets. If you get really stuck, feel free to drop me an email

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

                  Thanks! I'll keep that in mind;

                  MVVM # - I did it My Way ___________________________________________ Man, you're a god. - walterhevedeich 26/05/2011 .\\axxx (That's an 'M')

                  1 Reply Last reply
                  0
                  • R RichardGrimmer

                    This might just help[^]

                    C# has already designed away most of the tedium of C++.

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

                    Awesome - thanks!

                    MVVM # - I did it My Way ___________________________________________ Man, you're a god. - walterhevedeich 26/05/2011 .\\axxx (That's an 'M')

                    1 Reply Last reply
                    0
                    • A AspDotNetDev

                      The fast way.

                      Thou mewling ill-breeding pignut!

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

                      I tried that, but when I went back in time I just ended up going to the pub with myself! Wow- I'm good company ;)

                      MVVM # - I did it My Way ___________________________________________ Man, you're a god. - walterhevedeich 26/05/2011 .\\axxx (That's an 'M')

                      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