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. Automatically generate header file?

Automatically generate header file?

Scheduled Pinned Locked Moved C / C++ / MFC
c++toolstutorialquestion
5 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.
  • I Offline
    I Offline
    ivex
    wrote on last edited by
    #1

    Are there any tools can generate header file from a cpp file automatically? For example it generate the cpp file: double sum(double a, double b) {return a + b;} bool islowercase(char ch) {return ('a' <= ch && 'z' >= ch);} void main() {printf("A");} into a header file as: double sum(double, double); bool islowercase(char);

    L S B M 4 Replies Last reply
    0
    • I ivex

      Are there any tools can generate header file from a cpp file automatically? For example it generate the cpp file: double sum(double a, double b) {return a + b;} bool islowercase(char ch) {return ('a' <= ch && 'z' >= ch);} void main() {printf("A");} into a header file as: double sum(double, double); bool islowercase(char);

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

      it really wouldnt be so difficult to process the file and figure out the function def lines and write them to a header file


      situations to avoid #37:
      "good morning ... how many sugars do you take in your coffee ... and what was your name again?"

      coming soon: situations to avoid #38: "...and the dog was there too?"

      1 Reply Last reply
      0
      • I ivex

        Are there any tools can generate header file from a cpp file automatically? For example it generate the cpp file: double sum(double a, double b) {return a + b;} bool islowercase(char ch) {return ('a' <= ch && 'z' >= ch);} void main() {printf("A");} into a header file as: double sum(double, double); bool islowercase(char);

        S Offline
        S Offline
        Shog9 0
        wrote on last edited by
        #3

        ivex wrote: Are there any tools can generate header file from a cpp file automatically? Not that i've heard, although i'd love to see one. This is something that really grates on me when reading or writing C++ after seeing Java or C# code. --------_**

        And we die young. Faster we run.

        **_

        Alice in Chains, We Die Young

        1 Reply Last reply
        0
        • I ivex

          Are there any tools can generate header file from a cpp file automatically? For example it generate the cpp file: double sum(double a, double b) {return a + b;} bool islowercase(char ch) {return ('a' <= ch && 'z' >= ch);} void main() {printf("A");} into a header file as: double sum(double, double); bool islowercase(char);

          B Offline
          B Offline
          bryce
          wrote on last edited by
          #4

          yer there is a perl script called "makeh" Bryce

          1 Reply Last reply
          0
          • I ivex

            Are there any tools can generate header file from a cpp file automatically? For example it generate the cpp file: double sum(double a, double b) {return a + b;} bool islowercase(char ch) {return ('a' <= ch && 'z' >= ch);} void main() {printf("A");} into a header file as: double sum(double, double); bool islowercase(char);

            M Offline
            M Offline
            Mike Nordell
            wrote on last edited by
            #5

            If you're using VC6, I think you haven't studied the compiler switches before asking. But then "void main" also displays something. :-> Try /Zg

            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