The headers tag has no wiki summary.
1
vote
0answers
37 views
Web revisioning and the Accept-Datetime header
I have been in the process of generating documentation for an upcoming project. One of the features of the data available in this project is that it will be revisioned (or at least large parts of it ...
0
votes
1answer
111 views
Custom use of Authorization header in a REST API
I'm building a REST api where clients are authenticated using client certificates. A client in this case is not an individual user, but some sort of a presentation layer. Users are authenticated using ...
12
votes
6answers
3k views
Is it better to document functions in the header file or the source file?
In languages that distinguish between a "source" and "header" file (mainly C and C++), is it better to document functions in the header file:
(pilfered from CCAN)
/**
* time_now - return the ...
2
votes
4answers
620 views
What should and what shouldn't be in a header file?
What things should absolutely never be included in a header file?
If for example I'm working with a documented industry standard format that has a lot of constants, is it a good practice to define ...
3
votes
1answer
71 views
Handling bugs, quirks, or annoyances in vendor-supplied headers
If the header file supplied by a vendor of something with whom one's code must interact is deficient in some way, in what cases is it better to:
Work around the header's deficiencies in the main ...
0
votes
1answer
112 views
How do I parse a header with two different version [ID3] avoiding code duplication?
I really hope you can give me some interesting viewpoints for my situation, because I am not satisfied with my current approach.
I am writing an MP3 parser, starting with an ID3v2 parser.
Right now ...
1
vote
3answers
238 views
Common header file for C++ and JavaScipt
I have an app that runs a C++ server backend and Javascript on the client. I would like to define certain strings once only, for both pieces of code. For example, I might have a CSS class ...
0
votes
2answers
406 views
What's special in July 26th and why is it used in examples for Expires header so often?
I've noticed that July 26th (my birthday) is used really often in various PHP examples related to preventing http caching using Expires header, like:
...
18
votes
3answers
2k views
Why do we need to put private members in headers?
Private variables are a way to hide complexity and implementation details to the user of a class. This is a rather nice feature. But I do not understand why in c++ we need to put them in the header of ...
2
votes
2answers
338 views
What is the purpose of including header files in the solution in Visual Studio?
So I have including the files to my projects by simply : #include "myheader.hpp" and adding the headers into the solution explorer.
But recently I have realized that I may omit the step of adding the ...
15
votes
3answers
2k views
Copyright statements in source code
Ever since I started programming I've seen a header at the top of most code files indicating some sort of copyright: e.g.
/* Copyright (c) 1998 Innotech */
or
/* Copyright (c) 1998-2008 Innotech ...
1
vote
2answers
569 views
Finding header files
A C or C++ compiler looks for header files using a strict set of rules: relative to the directory of the including file (if "" was used), then along the specified and default include paths, fail if ...
1
vote
3answers
238 views
Should non-interface code be hidden from the client?
I am working on a library which had several headers that are meant to only be used by the library itself. I also have a few classes and functions in headers that I do not want the client to use. For ...
4
votes
5answers
2k views
Why do we need to write a header file?
Before you whip out your snarky comments, I know -- this is a nooby question. This is my first time using a C based language.
I'm an undergrad student learning Objective C for a computer science ...
0
votes
1answer
102 views
What are the benefits of not including other header files in a header file?
Sometimes, a header file uses objects that are in declared in other header files. The user of this header file would have to include the dependency anyway and get the order correct too.
0
votes
2answers
230 views
Is it a good idea to use Header(“Content-Type […]”); in the core file of a CMS?
I have been working on content management systems for about 7 years. 2 years ago created my own. Currently building a newew, better and bigger version.
However, fell into dilemma. I have a core file, ...
5
votes
1answer
2k views
Header comment format
I realize that the "header comment" format varies from programmer to programmer, but what would be an example of a "good" header comment?
7
votes
5answers
3k views
Why on C++ you can have the method definition inside the header file when in C you cannot?
In C, you cannot have the function definition/implementation inside the header file. However, in C++ you can have full method implementation inside the header file. Why is the behaviour different?
5
votes
4answers
507 views
Ways to organize interface and implementation in C++
I've seen that there are several different paradigms in C++ concerning what goes into the header file and what to the cpp file. AFAIK, most people, especially those from a C background, do:
foo.h
...
5
votes
7answers
477 views
Which languages use “paired” header/implementation files?
C is ubiquitous, and C++ nearly as much, but I'm curious which other languages follow a similar model of header files. Specifically, in which other languages is it idiomatic to edit pairs or groups ...