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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T14:00:43+00:00 2026-06-01T14:00:43+00:00

Suppose you are creating a class with multiple .cpp files (which each contain the

  • 0

Suppose you are creating a class with multiple .cpp files (which each contain the implementation of a member function) and have the class’ declaration in a .h file. Also, each .cpp file includes the .h file via the include directive.

I was told that if you change the implementation of any of the member functions (.cpp files) that you will have to recompile every .cpp file in order to run the program. That is, if I had 5 member functions (each implemented in a .cpp file) and I changed the implementation of 1 of the .cpp files I would have to compile the 1 .cpp file I changed AND the 4 other .cpp files I didn’t change in order to correctly run my program.

My question, if the previous statement is true, is why is the statement is true? Any insight on this concept would be helpful.

  • 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-01T14:00:45+00:00Added an answer on June 1, 2026 at 2:00 pm

    It’s false. If there is no change to a particular implementation file, no change to header files it includes, and no changes to the environment or compiler options, there is absolutely no need to recompile it. Everything that affects the compilation of that file hasn’t changed.

    In fact, you can compile each of the files without even having any of the others at all. Then you can link all the compiled files together without all the implementation files ever having been in the same place.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Suppose I'm creating a session class, with relevant implementation as below: public class Session()
Suppose I have the following declaration: class Over1 { protected: class Under1 { };
i am dynamically creating sql query for inserting multiple records in one hit.Suppose no
Suppose I have: public class foobar { public int lorem; public int ipsum; }
Suppose I have string Name and Image Photo as properties of a class in
Suppose I have this structures in c++ : class A{ public: B b; }
Suppose I have the following Event model: from django.db import models import datetime class
The scenario Suppose I have the following two model classes: public class ProductColor {
I have a question about manually creating a .Net webservice proxy class. The WSDL
Suppose I'm creating a blog with specific types of posts. I have a model

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.