TGViewer
C++ - Reddit C++ - Reddit @r_cpp · 229 subscribers
Post #24105 19
Question about header files

So I'm committing some serious taboo and using chatGPT to help me make a CLI text based game I'm making. One thing that struck me as odd was that it kept wanting me to make header files. I asked about this and it said that it was good practice, and I questioned it because from my understanding this adds another file to compile and can create more overhead than needed especially if it's only used once. Now I haven't gotten to a point where I need to use the header files or source code more than once but I want it to be scalable as I work on it. So the main question is this. is it good to make a lot of header files for the game or should I just stick to source code. Why and why not. P.S. I also have looked into what other people say and official documentation but I can't make heads or tails of it.

https://redd.it/1ofd72j
@r_cpp
Reddit From the cpp community on Reddit Explore this post and more from the cpp community
More from @r_cpp
  1. Oct 14, 2026I tested whether a coding agent would use C++23 ranges without being told Blog post: https…
  2. Oct 14, 2026C++ futures part 1: The mental model https://devblogs.microsoft.com/oldnewthing/20261012-0…
  3. Oct 14, 2026C++ futures part 2: The mental model for std::promise, std::packaged_task https://devblogs…
  4. Oct 12, 2026[Release] slick-logger v2.2.0 — Lock-free asynchronous C++20 logging with multi-process sh…
  5. Oct 12, 2026Cheap alternative to reboot parameters (nohz, rcu, isolcpus) for stable benchmarks When no…
  6. Oct 12, 2026This C++ drama is crazy - Adobe votes no https://www.youtube.com/watch?v=DEqx_NMMH9Q https…
Threads Profile ViewerView any public Threads profile without an account.Open ThreadLook →Writing with AI? Make it sound human.Metric37 rewrites AI drafts so they read naturally. Free AI detector, 1,500 words free.Try Metric37 →