Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 357813
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T12:14:27+00:00 2026-05-12T12:14:27+00:00

I’m working on a C++ project in which there are a lot of classes

  • 0

I’m working on a C++ project in which there are a lot of classes that have classes, methods and includes all in a single file. This is a big problem, because frequently the method implementations require #include statements, and any file that wants to use a class inherits these #includes transitively. I was just thinking that it would be nice to have a tool that did the following operation on a C++ header file:

  1. Parse a C++ header file into two pieces: a header file that declares a class, its data and the methods of that class and a separate file that implements the methods.
  2. Removes unnecessary includes from the header file.
  3. Adds the necessary includes to the implementation file.

I understand that parsing C++ is very difficult, but even something that worked imperfectly would be an improvement over the repetitive text editing that I’m doing right now. Is there anything that does anything like this? Or am I stuck with the decision between rolling my own solution or hammering through this with my text editor?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-12T12:14:27+00:00Added an answer on May 12, 2026 at 12:14 pm

    Are you looking for something like Lazy C++?

    Lzz is a tool that automates many
    onerous C++ programming tasks. It can
    save you a lot of time and make coding
    more enjoyable. Given a sequence of
    declarations Lzz will generate your
    header and source files.

    Example from the same place:

        // A.lzz
        class A
        {
        public:
          inline void f (int i) { ... }
          void g (int j = 0) { ... }
        };
        bool operator == (A const & a1, A const & a2) { ... }
    
    Lzz will generate a header file:
    
        // A.h
        #ifndef LZZ_A_h
        #define LZZ_A_h
        class A
        {
        public:
          void f (int i);
          void g (int j = 0);
        };
        inline void A::f (int i) { ... }
        bool operator == (A const & a1, A const & a2);
        #endif
    
    And a source file:
    
        // A.cpp
        #include "A.h"
        void A::g (int j) { ... }
        bool operator == (A const & a1, A const & a2) { ... }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I know there's a lot of other questions out there that deal with this
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I have a text area in my form which accepts all possible characters from
I have a .ini file as follows: [playlist] numberofentries=2 File1=http://87.230.82.17:80 Title1=(#1 - 365/1400) Example
I have just tried to save a simple *.rtf file with some websites and
this is what i have right now Drawing an RSS feed into the php,
I have a small JavaScript validation script that validates inputs based on Regex. I
I have this code to decode numeric html entities to the UTF8 equivalent character.
I have a French site that I want to parse, but am running into

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.