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 8675235
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T19:54:05+00:00 2026-06-12T19:54:05+00:00

I was making a code and I had like 5 include files in there,

  • 0

I was making a code and I had like 5 include files in there, I was defining functions in this file and then realized why should not I just make separate header files for all the functions and then just include them in a file at last. But, I have seen that this is not done usually. Why not? Is there a particular disadvantage of doing this?

  • 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-06-12T19:54:06+00:00Added an answer on June 12, 2026 at 7:54 pm

    This is not a real answer, because the question has a wrong assumption:

    But, I have seen that this is not done usually.

    This is not true. This is a common practice. A good example is ffmpeg.h. The header is a front-end to an extensive library.

    The argument of long compilation times is bogus. Today the systems are very fast. This is only important for really huge systems, but I really don’t think that you work with them. I never encountered such systems myself.

    And compilation times aren’t execution times. This is another misconception.

    For your convenience the whole code of ffmpeg.h:

    #ifndef _INCLUDE_FFMPEG_H_
    #define _INCLUDE_FFMPEG_H_
    
    #ifdef HAVE_FFMPEG
    #include <avformat.h>
    #endif
    
    #include <stdio.h>
    #include <stdarg.h>
    
    /* Define a codec name/identifier for timelapse videos, so that we can
     * differentiate between normal mpeg1 videos and timelapse videos.
     */
    #define TIMELAPSE_CODEC "mpeg1_tl"
    
    struct ffmpeg {
    #ifdef HAVE_FFMPEG
        AVFormatContext *oc;
        AVStream *video_st;
        AVCodecContext *c;
    
        AVFrame *picture;       /* contains default image pointers */
        uint8_t *video_outbuf;
        int video_outbuf_size;
    
        void *udata;            /* U & V planes for greyscale images */
        int vbr;                /* variable bitrate setting */
        char codec[20];         /* codec name */
    #else
        int dummy;
    #endif
    };
    
    /* Initialize FFmpeg stuff. Needs to be called before ffmpeg_open. */
    void ffmpeg_init(void);
    
    /* Open an mpeg file. This is a generic interface for opening either an mpeg1 or
     * an mpeg4 video. If non-standard mpeg1 isn't supported (FFmpeg build > 4680), 
     * calling this function with "mpeg1" as codec results in an error. To create a
     * timelapse video, use TIMELAPSE_CODEC as codec name.
     */
    struct ffmpeg *ffmpeg_open(
        char *ffmpeg_video_codec, 
        char *filename, 
        unsigned char *y,    /* YUV420 Y plane */
        unsigned char *u,    /* YUV420 U plane */
        unsigned char *v,    /* YUV420 V plane */
        int width,
        int height, 
        int rate,            /* framerate, fps */
        int bps,             /* bitrate; bits per second */
        int vbr              /* variable bitrate */
        );
    
    /* Puts the image pointed to by the picture member of struct ffmpeg. */
    void ffmpeg_put_image(struct ffmpeg *);
    
    /* Puts the image defined by u, y and v (YUV420 format). */
    void ffmpeg_put_other_image(
        struct ffmpeg *ffmpeg, 
        unsigned char *y, 
        unsigned char *u, 
        unsigned char *v
        );
    
    /* Closes the mpeg file. */
    void ffmpeg_close(struct ffmpeg *);
    
    /*Deinterlace the image. */
    void ffmpeg_deinterlace(unsigned char *, int, int);
    
    /*Setup an avcodec log handler. */
    void ffmpeg_avcodec_log(void *, int, const char *, va_list);
    
    #endif /* _INCLUDE_FFMPEG_H_ */
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I would like to start making code patches to Rails. Are there any good
I'm not talking about making portable code. This is more a question of distribution.
This might not appear like a programming question, but inherently deals with code. I
In my code I've been making functions like: public void Foo([ParamsDictionary] IAttributesCollection kwargs) {}
I am wondering if there is any technique out there for making HTML code
I can't find the problem. Why is this code making many copies of the
I have this simple code (for making things shorted, the important bits are probably
I have a Silverlight 3 project with something like this: <ItemGroup> <Content Include=Content\image1.png> </Content>
I'm trying to pull code comment blocks out of JavaScript files. I'm making a
Till now I had been using following code to ftp file from one location

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.