You are not logged in. Your edit will be placed in a queue until it is peer reviewed.
We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.
Required fields*
-
12This question could go a couple of ways .. "Why do we need headers when using c++" or, "Do you think a modern language that is meant to be compiled should be using headers?" As it is, it has 'What do I do" and "hate" in the title, which sets off a plethora of flags.user131– user1312011-01-10 16:29:16 +00:00Commented Jan 10, 2011 at 16:29
-
8Your question makes it seem like you don't understand C++, or how whatever system you use compiles it. Learn to use it properly, and then ask more subjective questions.David Thornley– David Thornley2011-01-10 16:35:28 +00:00Commented Jan 10, 2011 at 16:35
-
39Your first sentence indicates that you don't "understand everything about headers". Including a .h file does not cause the corresponding .cpp file to be "somehow compiled too". You compile .cpp files independently in their own right. If you haven't compiled the corresponding .cpp, then the inclusion of a header without a corresponding object file will cause the linker to fail.Paul Butcher– Paul Butcher2011-01-10 17:50:00 +00:00Commented Jan 10, 2011 at 17:50
-
6What to do? Find another language if it bugs you that much.Paul Nathan– Paul Nathan2011-01-10 19:23:46 +00:00Commented Jan 10, 2011 at 19:23
-
5About the "can't live with copy-pasting": Whenever one updates a function, one has to update all places where it is called anyway. As the callers are much harder to find than the declaration in the header file, updating the header is just a minor detail.Sjoerd– Sjoerd2011-01-10 22:53:44 +00:00Commented Jan 10, 2011 at 22:53
|
Show 13 more comments
How to Edit
- Correct minor typos or mistakes
- Clarify meaning without changing it
- Add related resources or links
- Always respect the author’s intent
- Don’t use edits to reply to the author
How to Format
-
create code fences with backticks ` or tildes ~
```
like so
``` -
add language identifier to highlight code
```python
def function(foo):
print(foo)
``` - put returns between paragraphs
- for linebreak add 2 spaces at end
- _italic_ or **bold**
- indent code by 4 spaces
- backtick escapes
`like _so_` - quote by placing > at start of line
- to make links (use https whenever possible)
<https://example.com>[example](https://example.com)<a href="https://example.com">example</a>
How to Tag
A tag is a keyword or label that categorizes your question with other, similar questions. Choose one or more (up to 5) tags that will help answerers to find and interpret your question.
- complete the sentence: my question is about...
- use tags that describe things or concepts that are essential, not incidental to your question
- favor using existing popular tags
- read the descriptions that appear below the tag
If your question is primarily about a topic for which you can't find a tag:
- combine multiple words into single-words with hyphens (e.g. design-patterns), up to a maximum of 35 characters
- creating new tags is a privilege; if you can't yet create a tag you need, then post this question without it, then ask the community to create it for you
lang-cpp