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. Apply header programmatically

Apply header programmatically

Scheduled Pinned Locked Moved C / C++ / MFC
c++question
6 Posts 5 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.
  • A Offline
    A Offline
    Al_Pennyworth
    wrote on last edited by
    #1

    We have recently been tasked with modifying all of our .cpp, .h, and .c files to include a specialized header at the top of the files. Is anyone familiar with any application that apply this header programmatically and save us a lot of manual work?

    R C K A M 5 Replies Last reply
    0
    • A Al_Pennyworth

      We have recently been tasked with modifying all of our .cpp, .h, and .c files to include a specialized header at the top of the files. Is anyone familiar with any application that apply this header programmatically and save us a lot of manual work?

      R Offline
      R Offline
      Roger Stoltz
      wrote on last edited by
      #2

      I don't know of any. But it shouldn't take more than a couple of hours to write one of your own. I would make a dialog based app that would let me select a file that contained the header I wanted and then let me browse for a folder where my source files were located. Making it more fancy, e.g. a tree view with checkboxes for all files, would probably take two more hours to make it work properly.


      "It's supposed to be hard, otherwise anybody could do it!" - selfquote
      "High speed never compensates for wrong direction!" - unknown

      1 Reply Last reply
      0
      • A Al_Pennyworth

        We have recently been tasked with modifying all of our .cpp, .h, and .c files to include a specialized header at the top of the files. Is anyone familiar with any application that apply this header programmatically and save us a lot of manual work?

        C Offline
        C Offline
        Cedric Moonen
        wrote on last edited by
        #3

        Maybe you can include it in your stdafx file if you use one ?


        Cédric Moonen Software developer
        Charting control [v1.1]

        1 Reply Last reply
        0
        • A Al_Pennyworth

          We have recently been tasked with modifying all of our .cpp, .h, and .c files to include a specialized header at the top of the files. Is anyone familiar with any application that apply this header programmatically and save us a lot of manual work?

          K Offline
          K Offline
          krmed
          wrote on last edited by
          #4

          I have done this with a macro in the past - both in VC6 and in VS2005. It means you have to open each file in the editor and select the macro, but that's better then hand-typing the header every time.

          Karl - WK5M PP-ASEL-IA (N43CS) PGP Key: 0xDB02E193 PGP Key Fingerprint: 8F06 5A2E 2735 892B 821C 871A 0411 94EA DB02 E193

          1 Reply Last reply
          0
          • A Al_Pennyworth

            We have recently been tasked with modifying all of our .cpp, .h, and .c files to include a specialized header at the top of the files. Is anyone familiar with any application that apply this header programmatically and save us a lot of manual work?

            A Offline
            A Offline
            Al_Pennyworth
            wrote on last edited by
            #5

            After some digging, I did decide to write my own application in C# that will take a header file and apply it to the top of every source code file.

            1 Reply Last reply
            0
            • A Al_Pennyworth

              We have recently been tasked with modifying all of our .cpp, .h, and .c files to include a specialized header at the top of the files. Is anyone familiar with any application that apply this header programmatically and save us a lot of manual work?

              M Offline
              M Offline
              Michael Dunn
              wrote on last edited by
              #6

              You could do that in a few lines of Perl :)

              --Mike-- Visual C++ MVP :cool: LINKS~! Ericahist | PimpFish | CP SearchBar v3.0 | C++ Forum FAQ Ford, what's this fish doing in my ear?

              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