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. [C++] Where to find coding examples and exercises?

[C++] Where to find coding examples and exercises?

Scheduled Pinned Locked Moved C / C++ / MFC
c++helpquestionlearning
11 Posts 6 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.
  • D den2k88

    Hi all, I'm writing a C++ class for my company and I finished all the explanation parts. Now I need to intersperse both examples, mostly detailing differences of implementation of basic functionalities between C and C++, and exercises to give the trainees (freshly graduated). I need them to be an inspiration for me, not going to copy/paste them shamelessly, since I'm going to illustrate the points I've made in the course. Also they will be in powerpoint so I will need to trim them quite a bit. If you know sources you trust for this kind of content you would help me a lot (yes, I will search with my Google-fu but your knowledge, training, experience and Google-jitsu may help me nevertheless). Thanks.

    GCS d--(d+) s-/++ a C++++ U+++ P- L+@ E-- W++ N+ o+ K- w+++ O? M-- V? PS+ PE- Y+ PGP t+ 5? X R+++ tv-- b+(+++) DI+++ D++ G e++ h--- r+++ y+++*      Weapons extension: ma- k++ F+2 X

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

    MSDN has plenty: Visual C++: Samples Included in Visual C++ | Microsoft Docs[^].

    D 1 Reply Last reply
    0
    • L Lost User

      MSDN has plenty: Visual C++: Samples Included in Visual C++ | Microsoft Docs[^].

      D Offline
      D Offline
      den2k88
      wrote on last edited by
      #3

      Microsoft C++ samples are overly complex for an introductory course which has to cram C++ in 8 hours, on powerpoint slides, to students who just got out of college. I will take a good look at them anyway, thanks!

      GCS d--(d+) s-/++ a C++++ U+++ P- L+@ E-- W++ N+ o+ K- w+++ O? M-- V? PS+ PE- Y+ PGP t+ 5? X R+++ tv-- b+(+++) DI+++ D++ G e++ h--- r+++ y+++*      Weapons extension: ma- k++ F+2 X

      L 1 Reply Last reply
      0
      • D den2k88

        Microsoft C++ samples are overly complex for an introductory course which has to cram C++ in 8 hours, on powerpoint slides, to students who just got out of college. I will take a good look at them anyway, thanks!

        GCS d--(d+) s-/++ a C++++ U+++ P- L+@ E-- W++ N+ o+ K- w+++ O? M-- V? PS+ PE- Y+ PGP t+ 5? X R+++ tv-- b+(+++) DI+++ D++ G e++ h--- r+++ y+++*      Weapons extension: ma- k++ F+2 X

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

        The alternative (and very time consuming) is to go through the list of library/standard template library functions and take the sample code from each. But it all rather depends on exactly what you want to teach them.

        1 Reply Last reply
        0
        • D den2k88

          Hi all, I'm writing a C++ class for my company and I finished all the explanation parts. Now I need to intersperse both examples, mostly detailing differences of implementation of basic functionalities between C and C++, and exercises to give the trainees (freshly graduated). I need them to be an inspiration for me, not going to copy/paste them shamelessly, since I'm going to illustrate the points I've made in the course. Also they will be in powerpoint so I will need to trim them quite a bit. If you know sources you trust for this kind of content you would help me a lot (yes, I will search with my Google-fu but your knowledge, training, experience and Google-jitsu may help me nevertheless). Thanks.

          GCS d--(d+) s-/++ a C++++ U+++ P- L+@ E-- W++ N+ o+ K- w+++ O? M-- V? PS+ PE- Y+ PGP t+ 5? X R+++ tv-- b+(+++) DI+++ D++ G e++ h--- r+++ y+++*      Weapons extension: ma- k++ F+2 X

          CPalliniC Offline
          CPalliniC Offline
          CPallini
          wrote on last edited by
          #5

          Definitely dated, but 'inspirational': Guru of the Week[^]

          In testa che avete, signor di Ceprano?

          1 Reply Last reply
          0
          • D den2k88

            Hi all, I'm writing a C++ class for my company and I finished all the explanation parts. Now I need to intersperse both examples, mostly detailing differences of implementation of basic functionalities between C and C++, and exercises to give the trainees (freshly graduated). I need them to be an inspiration for me, not going to copy/paste them shamelessly, since I'm going to illustrate the points I've made in the course. Also they will be in powerpoint so I will need to trim them quite a bit. If you know sources you trust for this kind of content you would help me a lot (yes, I will search with my Google-fu but your knowledge, training, experience and Google-jitsu may help me nevertheless). Thanks.

            GCS d--(d+) s-/++ a C++++ U+++ P- L+@ E-- W++ N+ o+ K- w+++ O? M-- V? PS+ PE- Y+ PGP t+ 5? X R+++ tv-- b+(+++) DI+++ D++ G e++ h--- r+++ y+++*      Weapons extension: ma- k++ F+2 X

            D Offline
            D Offline
            David Crow
            wrote on last edited by
            #6

            den2k88 wrote:

            I'm writing a C++ class...

            When I first read that, I thought you were writing a C++ class, and thus the rest of your message made no sense.

            "One man's wage rise is another man's price increase." - Harold Wilson

            "Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons

            "You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles

            K 1 Reply Last reply
            0
            • D den2k88

              Hi all, I'm writing a C++ class for my company and I finished all the explanation parts. Now I need to intersperse both examples, mostly detailing differences of implementation of basic functionalities between C and C++, and exercises to give the trainees (freshly graduated). I need them to be an inspiration for me, not going to copy/paste them shamelessly, since I'm going to illustrate the points I've made in the course. Also they will be in powerpoint so I will need to trim them quite a bit. If you know sources you trust for this kind of content you would help me a lot (yes, I will search with my Google-fu but your knowledge, training, experience and Google-jitsu may help me nevertheless). Thanks.

              GCS d--(d+) s-/++ a C++++ U+++ P- L+@ E-- W++ N+ o+ K- w+++ O? M-- V? PS+ PE- Y+ PGP t+ 5? X R+++ tv-- b+(+++) DI+++ D++ G e++ h--- r+++ y+++*      Weapons extension: ma- k++ F+2 X

              L Offline
              L Offline
              leon de boer
              wrote on last edited by
              #7

              Personally you are doing it all backwards you give new graduates the company programming rules and guidelines and tell them what happens if they submit junk that doesn't conform ... which usually involves buying rounds of beers. They will have a pile of bad habits and completely unacceptable risks they picked up at uni and thought was cool and some are just dam lazy. Then you get them to try and write a simple program that conforms and discuss the errors and violations they will without doubt submit. Trust me there will be as many different coding styles as you have graduates and somehow you have to get them all to be able to read each others code as well as you. You aren't trying to stifle thinking and coding imagination but you need to get them on the same pages with standards. As for examples... Rosetta Code has hundreds Category:C - Rosetta Code[^]

              In vino veritas

              D 1 Reply Last reply
              0
              • L leon de boer

                Personally you are doing it all backwards you give new graduates the company programming rules and guidelines and tell them what happens if they submit junk that doesn't conform ... which usually involves buying rounds of beers. They will have a pile of bad habits and completely unacceptable risks they picked up at uni and thought was cool and some are just dam lazy. Then you get them to try and write a simple program that conforms and discuss the errors and violations they will without doubt submit. Trust me there will be as many different coding styles as you have graduates and somehow you have to get them all to be able to read each others code as well as you. You aren't trying to stifle thinking and coding imagination but you need to get them on the same pages with standards. As for examples... Rosetta Code has hundreds Category:C - Rosetta Code[^]

                In vino veritas

                D Offline
                D Offline
                den2k88
                wrote on last edited by
                #8

                They don't know C++ at all, just the basics of C without any practical programming with the exception of the laboratories and exams (of course there are exceptions, one or two each batch of 30). Most of them rarely used a compiler, coding rules are way bove their head.

                GCS d--(d+) s-/++ a C++++ U+++ P- L+@ E-- W++ N+ o+ K- w+++ O? M-- V? PS+ PE- Y+ PGP t+ 5? X R+++ tv-- b+(+++) DI+++ D++ G e++ h--- r+++ y+++*      Weapons extension: ma- k++ F+2 X

                L 1 Reply Last reply
                0
                • D David Crow

                  den2k88 wrote:

                  I'm writing a C++ class...

                  When I first read that, I thought you were writing a C++ class, and thus the rest of your message made no sense.

                  "One man's wage rise is another man's price increase." - Harold Wilson

                  "Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons

                  "You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles

                  K Offline
                  K Offline
                  k5054
                  wrote on last edited by
                  #9

                  Oh thank goodness. Now it all makes sense. I wonder how many others here parsed it the same way.

                  Keep Calm and Carry On

                  1 Reply Last reply
                  0
                  • D den2k88

                    They don't know C++ at all, just the basics of C without any practical programming with the exception of the laboratories and exams (of course there are exceptions, one or two each batch of 30). Most of them rarely used a compiler, coding rules are way bove their head.

                    GCS d--(d+) s-/++ a C++++ U+++ P- L+@ E-- W++ N+ o+ K- w+++ O? M-- V? PS+ PE- Y+ PGP t+ 5? X R+++ tv-- b+(+++) DI+++ D++ G e++ h--- r+++ y+++*      Weapons extension: ma- k++ F+2 X

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

                    den2k88 wrote:

                    Most of them rarely used a compiler

                    More recruits to QA :((

                    D 1 Reply Last reply
                    0
                    • L Lost User

                      den2k88 wrote:

                      Most of them rarely used a compiler

                      More recruits to QA :((

                      D Offline
                      D Offline
                      den2k88
                      wrote on last edited by
                      #11

                      They usually use SO, CP is quite unknown here in Italy except for the actual professionals.

                      GCS d--(d+) s-/++ a C++++ U+++ P- L+@ E-- W++ N+ o+ K- w+++ O? M-- V? PS+ PE- Y+ PGP t+ 5? X R+++ tv-- b+(+++) DI+++ D++ G e++ h--- r+++ y+++*      Weapons extension: ma- k++ F+2 X

                      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