473,785 Members | 2,756 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

What is a header?

If a header is not necessarily a source file, and the sequences delimited by
< and > in header names aren't necessarily valid source file names, what
exactly is a header?
--
p->m == (*p).m == p[0].m
http://www.kdevelop.org
http://www.suse.com
http://www.mozilla.org
Jul 22 '05
31 2806
E. Robert Tisdale wrote:
All "header" really means is that it is included
near the head of a source file or another header.
C doesn't support module interfaces explicitly
so headers were used to *improvise*
without ever acknowledging this deficiency in the language.

"I'd like to see Cpp abolished." - Bjarne Stroustrup

So why does it survive? My suspicion is that everybody thinks the other guy
knows how it's defined, and how it works. People think it's sacrosanct and
not subject to question or challenge. The ugly truth is, nobody knows how
it is defined other than 'poorly'.

--
STH
Hatton's Law: "There is only One inviolable Law"
KDevelop: http://www.kdevelop.org SuSE: http://www.suse.com
Mozilla: http://www.mozilla.org
Jul 22 '05 #31
"Steven T. Hatton" <su******@setid ava.kushan.aa> wrote in message
news:a7******** ************@sp eakeasy.net...
E. Robert Tisdale wrote:
All "header" really means is that it is included
near the head of a source file or another header.
C doesn't support module interfaces explicitly
so headers were used to *improvise*
without ever acknowledging this deficiency in the language.

"I'd like to see Cpp abolished." - Bjarne Stroustrup

So why does it survive? My suspicion is that everybody thinks the

other guy knows how it's defined, and how it works. People think it's sacrosanct and not subject to question or challenge. The ugly truth is, nobody knows how it is defined other than 'poorly'.


Nonsense. Headers were used to simulate COBOL copybooks. Since
everyone knew how THEY worked (in 1964) it all made perfectly good
sense. With file type associations, I half-like cpp as an extention
that launches my preferred compiler. It would be nice to have cp1,
cp2, etc. for launching different compilers.
Hey! I can do that for myself! The trouble is it ain't portable and my
files may eventually get used by another programmer at work. The real
movement to guard against is people who suggest using the same file
type for generic identification (.src for all source, .doc for all
documents, .txt for all text, etc.).
--
Gary
Jul 22 '05 #32

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
22274
by: Zhang Weiwu | last post by:
Hello. I am working with a php software project, in it (www.egroupware.org) Chinese simplified locate is "zh" while Traditional Chinese "tw". I wish to send correct language attribute in http header, I found "zh" is not standard. I found this line in apache2's default httpd.conf # Simplified Chinese (zh-CN) AddLanguage zh-CN .zh-cn
31
1790
by: Steven T. Hatton | last post by:
If a header is not necessarily a source file, and the sequences delimited by < and > in header names aren't necessarily valid source file names, what exactly is a header? -- p->m == (*p).m == p.m http://www.kdevelop.org http://www.suse.com http://www.mozilla.org
3
1827
by: Peter Oliphant | last post by:
I know that 'stdafx.h' has to do with pre-compiled headers. However, it seem weird that it is a required 'include' in any CPP file, especially since the file itself has no code in it! I know that 'stdafx.h' is a good place to put "include files that are used frequently, but are changed infrequently" . But why does this file HAVE to be included when it contains nothing? Just curious about this. I just include it like always and...
4
3640
by: Kunle Odutola | last post by:
I'm trying to understand where the information in the META.INF directory including MANIFEST.MF etc is to be found for .NET assemblies. Also some projects such as Eclipse's OSGi kernel stores additional info in the MANIFEST.MF file. What would be the .NET equivalent where such info can be stored? Kunle --
82
31157
by: quiberon2 | last post by:
Hi, Sorry if it might be a stupid question but what should returns malloc(0) ? void *ptr = malloc(0); I am running gcc 3.3.5 and a non-null address is returned. ( in the compiler that I am currently implementing, NULL is returned. Is it wrong ?)
6
2262
by: DaTurk | last post by:
Hi, I'm a bit rusty with the wonderful language of c++. I worked with it, maybe 6 or 7 years ago and now I need to knock the dust off. But I was perusing some code when I noticed that this one programmer put the entire class in the header file. I'm not sure what the point to that is. Can someone please enlighten me as to why you would want to do this? And if you do want to, what are the pro's and cons of doing it. Are
8
2146
by: The Cool Giraffe | last post by:
One thing i do know for sure. When one creates a CPP file, one needs to include the H file. Now, having said that, i wonder if there are some general hints, requirements or standard guide lines on what and how to include. Suppose that we have a project consisting of a number of classes and structs. Some of them using the others, some using all of them. What is a good approach when including? --
4
9179
by: andre rodier | last post by:
Hello, I need to display or propose a jpeg image on a web page. When I need to display the image, I use this code : header("Content-Length: $fileSize") ; header("Content-Type: $type") ; header("Content-disposition: inline") ; header("Location: $imageURL"); And when I need to propose the image to save, I use this one :
9
1934
by: xiao | last post by:
It always dumped when I tried to run it... But it compiles OK. What I want to do is to do a test: Read information from a .dat file and then write it to another file. The original DAT file is like this : (very simple..........) 010001010110001101010101010101010101010101 #include<stdio.h>
0
9643
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9480
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
10087
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9947
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8971
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7496
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5511
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4046
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3645
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.