473,242 Members | 1,700 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,242 software developers and data experts.

standard headers

If I
# include "text.h"
, where text.h consists of the following:
# define NOTHING_IMPORTANT
# include <stdio.h>
, am I writing c++? cordially, bfx
Jul 2 '06 #1
11 1861
BilfFord X wrote:
If I
# include "text.h"
, where text.h consists of the following:
# define NOTHING_IMPORTANT
# include <stdio.h>
, am I writing c++? cordially, bfx
Yes, you are... I am feverishly looking for a catch in
your question. I don't see it, though. Why did you ask?

Generally speaking, including <stdio.his OK, but in C++
we usually include <cstdioinstead.

V
--
Please remove capital 'A's when replying by e-mail
I do not respond to top-posted replies, please don't ask
Jul 2 '06 #2

"Victor Bazarov" <v.********@comAcast.netwrote in message
news:ja******************************@comcast.com. ..
BilfFord X wrote:
>If I
# include "text.h"
, where text.h consists of the following:
# define NOTHING_IMPORTANT
# include <stdio.h>
, am I writing c++? cordially, bfx

Yes, you are... I am feverishly looking for a catch in
your question. I don't see it, though. Why did you ask?

Generally speaking, including <stdio.his OK, but in C++
we usually include <cstdioinstead.
I'm trying to get a handle on what makes a non standard header non standard.
I've been cutting open the header files for my implementation, and they
haven't oozed evil like one would expect. The following is a header file
from jacob navia's lcc:
#ifndef __windows_h__
#define __windows_h__
#ifndef __stdlib_h__
#include <stdlib.h>
#endif
#ifndef __string_h__
#include <string.h>
#endif
#include <win.h>
#endif
/* end header post */
This poor fella gets slapped around on the other end of the hallway because
of non standard headers more than Mike Tyson's girlfriends. In these ten
statements, where lies the offense, in particular, when you and I have no
notion what could be in win.h? cordially, bfx
Jul 3 '06 #3
BilfFord X wrote:
"Victor Bazarov" <v.********@comAcast.netwrote in message
news:ja******************************@comcast.com. ..
>>BilfFord X wrote:
>>>If I
# include "text.h"
, where text.h consists of the following:
# define NOTHING_IMPORTANT
# include <stdio.h>
, am I writing c++? cordially, bfx

Yes, you are... I am feverishly looking for a catch in
your question. I don't see it, though. Why did you ask?

Generally speaking, including <stdio.his OK, but in C++
we usually include <cstdioinstead.

I'm trying to get a handle on what makes a non standard header non standard.
Simple - if you can't find it in the standard, it ain't a standard header.

Thus if you us it, your code isn't portable to other systems.

--
Ian Collins.
Jul 3 '06 #4

"Ian Collins" <ia******@hotmail.comwrote in message
news:4g*************@individual.net...
BilfFord X wrote:
>"Victor Bazarov" <v.********@comAcast.netwrote in message
news:ja******************************@comcast.com ...
>>>BilfFord X wrote:

If I
# include "text.h"
, where text.h consists of the following:
# define NOTHING_IMPORTANT
# include <stdio.h>
, am I writing c++? cordially, bfx

Yes, you are... I am feverishly looking for a catch in
your question. I don't see it, though. Why did you ask?

Generally speaking, including <stdio.his OK, but in C++
we usually include <cstdioinstead.

I'm trying to get a handle on what makes a non standard header non
standard.

Simple - if you can't find it in the standard, it ain't a standard header.

Thus if you us it, your code isn't portable to other systems.
Is my text.h above in the standard? cordially, b
Jul 3 '06 #5
BilfFord X wrote:
"Ian Collins" <ia******@hotmail.comwrote in message
news:4g*************@individual.net...
>>BilfFord X wrote:
>>>"Victor Bazarov" <v.********@comAcast.netwrote in message
news:ja******************************@comcast.c om...
BilfFord X wrote:
>If I
># include "text.h"
>, where text.h consists of the following:
># define NOTHING_IMPORTANT
># include <stdio.h>
>, am I writing c++? cordially, bfx

Yes, you are... I am feverishly looking for a catch in
your question. I don't see it, though. Why did you ask?

Generally speaking, including <stdio.his OK, but in C++
we usually include <cstdioinstead.

I'm trying to get a handle on what makes a non standard header non
standard.

Simple - if you can't find it in the standard, it ain't a standard header.

Thus if you us it, your code isn't portable to other systems.

Is my text.h above in the standard? cordially, b
Of course not, but everything it includes is. Try and apply some common
sense.

--
Ian Collins.
Jul 3 '06 #6

"Ian Collins" <ia******@hotmail.comwrote in message
news:4g*************@individual.net...
BilfFord X wrote:
>"Ian Collins" <ia******@hotmail.comwrote in message
news:4g*************@individual.net...
>>>BilfFord X wrote:

"Victor Bazarov" <v.********@comAcast.netwrote in message
news:ja******************************@comcast. com...
>BilfFord X wrote:
>
>
>>If I
>># include "text.h"
>>, where text.h consists of the following:
>># define NOTHING_IMPORTANT
>># include <stdio.h>
>>, am I writing c++? cordially, bfx
>
>Yes, you are... I am feverishly looking for a catch in
>your question. I don't see it, though. Why did you ask?
>
>Generally speaking, including <stdio.his OK, but in C++
>we usually include <cstdioinstead.

I'm trying to get a handle on what makes a non standard header non
standard.

Simple - if you can't find it in the standard, it ain't a standard
header.

Thus if you us it, your code isn't portable to other systems.

Is my text.h above in the standard? cordially, b
Of course not, but everything it includes is. Try and apply some common
sense.
All right. So you're not going to be able to include a file that ultimately
includes an implemention-specific file such as windows.h , and drag it in
wholesale.

Is this:
#ifndef _WINDOWS_
#define _WINDOWS_
where windows.h craps out as standard? cordially, b
Jul 4 '06 #7
BilfFord X wrote:
"Victor Bazarov" <v.********@comAcast.netwrote in message
news:ja******************************@comcast.com. ..
>BilfFord X wrote:
>>If I
# include "text.h"
, where text.h consists of the following:
# define NOTHING_IMPORTANT
# include <stdio.h>
, am I writing c++? cordially, bfx

Yes, you are... I am feverishly looking for a catch in
your question. I don't see it, though. Why did you ask?

Generally speaking, including <stdio.his OK, but in C++
we usually include <cstdioinstead.
I'm trying to get a handle on what makes a non standard header non
standard.
Your 'text.h' is a non-standard header. It doesn't matter that all
in it is standard C++. If it's not defined by the Standard, it's
not standard. However, when you asked "am I writing c++", the answer
is still "yes". Whatever we write is what we write, and our headers
while non-standard can still be a perfectly fine C++.
I've been cutting open the header files for my
implementation, and they haven't oozed evil like one would expect. The
following is a header file from jacob navia's lcc:
I honestly have no idea what "jacob navia's lcc" is.
#ifndef __windows_h__
#define __windows_h__
#ifndef __stdlib_h__
#include <stdlib.h>
#endif
#ifndef __string_h__
#include <string.h>
#endif
#include <win.h>
#endif
/* end header post */
This poor fella gets slapped around on the other end of the hallway
because of non standard headers more than Mike Tyson's girlfriends.
I don't understand. Why would he get slapped? Does he claim any
standard compliance? Does he claim to provide a C++ implementation?
In these ten statements, where lies the offense, in particular, when
you and I have no notion what could be in win.h? cordially, bfx
Why do you care what's inside *his* headers? If you need to include
them, include them. If you don't, don't. Furthermore, why do you
care what's in the headers that his headers include? Why should you
be aware of what <win.his? What if it's some obscure part of what
he provides to you?

V
--
Please remove capital 'A's when replying by e-mail
I do not respond to top-posted replies, please don't ask
Jul 4 '06 #8
BilfFord X wrote:
"Ian Collins" <ia******@hotmail.comwrote in message
news:4g*************@individual.net...
>>BilfFord X wrote:
>>>"Ian Collins" <ia******@hotmail.comwrote in message
news:4g*************@individual.net...
BilfFord X wrote:
>"Victor Bazarov" <v.********@comAcast.netwrote in message
>news:ja******************************@comcast .com...
>
>
>
>>BilfFord X wrote:
>>
>>
>>
>>>If I
>>># include "text.h"
>>>, where text.h consists of the following:
>>># define NOTHING_IMPORTANT
>>># include <stdio.h>
>>>, am I writing c++? cordially, bfx
>>
>>Yes, you are... I am feverishly looking for a catch in
>>your question. I don't see it, though. Why did you ask?
>>
>>Generally speaking, including <stdio.his OK, but in C++
>>we usually include <cstdioinstead.
>
>I'm trying to get a handle on what makes a non standard header non
>standard.

Simple - if you can't find it in the standard, it ain't a standard
header.

Thus if you us it, your code isn't portable to other systems.

Is my text.h above in the standard? cordially, b

Of course not, but everything it includes is. Try and apply some common
sense.

All right. So you're not going to be able to include a file that ultimately
includes an implemention-specific file such as windows.h , and drag it in
wholesale.

Is this:
#ifndef _WINDOWS_
#define _WINDOWS_
where windows.h craps out as standard? cordially, b
You are either a troll or a Muppet.

windows.h is a non-standard header because it isn't a standard header.

--
Ian Collins.
Jul 4 '06 #9

"Victor Bazarov" <v.********@comAcast.netwrote in message
news:c-******************************@comcast.com...
BilfFord X wrote:
>"Victor Bazarov" <v.********@comAcast.netwrote in message
news:ja******************************@comcast.com ...
>>BilfFord X wrote:
If I
# include "text.h"
, where text.h consists of the following:
# define NOTHING_IMPORTANT
# include <stdio.h>
, am I writing c++? cordially, bfx

Yes, you are... I am feverishly looking for a catch in
your question. I don't see it, though. Why did you ask?

Generally speaking, including <stdio.his OK, but in C++
we usually include <cstdioinstead.
I'm trying to get a handle on what makes a non standard header non
standard.

Your 'text.h' is a non-standard header. It doesn't matter that all
in it is standard C++. If it's not defined by the Standard, it's
not standard. However, when you asked "am I writing c++", the answer
is still "yes". Whatever we write is what we write, and our headers
while non-standard can still be a perfectly fine C++.
That's the answer I was looking for. Thank you.
>I've been cutting open the header files for my
implementation, and they haven't oozed evil like one would expect. The
following is a header file from jacob navia's lcc:

I honestly have no idea what "jacob navia's lcc" is.
>#ifndef __windows_h__
#define __windows_h__
#ifndef __stdlib_h__
#include <stdlib.h>
#endif
#ifndef __string_h__
#include <string.h>
#endif
#include <win.h>
#endif
/* end header post */
This poor fella gets slapped around on the other end of the hallway
because of non standard headers more than Mike Tyson's girlfriends.

I don't understand. Why would he get slapped? Does he claim any
standard compliance? Does he claim to provide a C++ implementation?
I don't understand either. He's on the receiving end of a lot of abuse over
this. Whether it's deserved is not something I can judge.
>In these ten statements, where lies the offense, in particular, when
you and I have no notion what could be in win.h? cordially, bfx

Why do you care what's inside *his* headers? If you need to include
them, include them. If you don't, don't. Furthermore, why do you
care what's in the headers that his headers include? Why should you
be aware of what <win.his? What if it's some obscure part of what
he provides to you?
It seems odd to me that the solution to the problem of non-standard headers
would seem to be to paste them into the implementation. Happy Fourth. bfx
Jul 4 '06 #10
BilfFord X wrote:
Is this:
#ifndef _WINDOWS_
#define _WINDOWS_
where windows.h craps out as standard? cordially, b
_WINDOWS_ is in the implementation namespace, so if you
define it yourself then you might break a standard header.

Your defines should not start with _ followed by a capital letter,
nor contain a double underscore anywhere.

Jul 5 '06 #11

"Ian Collins" <ia******@hotmail.comwrote in message
news:4g*************@individual.net...
BilfFord X wrote:
>"Ian Collins" <ia******@hotmail.comwrote in message
news:4g*************@individual.net...
>>>BilfFord X wrote:

"Ian Collins" <ia******@hotmail.comwrote in message
news:4g*************@individual.net...
>BilfFord X wrote:
>
>
>>"Victor Bazarov" <v.********@comAcast.netwrote in message
>>news:ja******************************@comcas t.com...
>>
>>
>>
>>>BilfFord X wrote:
>>>
>>>
>>>
>>>>If I
>>>># include "text.h"
>>>>, where text.h consists of the following:
>>>># define NOTHING_IMPORTANT
>>>># include <stdio.h>
>>>>, am I writing c++? cordially, bfx
>>>
>>>Yes, you are... I am feverishly looking for a catch in
>>>your question. I don't see it, though. Why did you ask?
>>>
>>>Generally speaking, including <stdio.his OK, but in C++
>>>we usually include <cstdioinstead.
>>
>>I'm trying to get a handle on what makes a non standard header non
>>standard.
>
>Simple - if you can't find it in the standard, it ain't a standard
>header.
>
>Thus if you us it, your code isn't portable to other systems.

Is my text.h above in the standard? cordially, b
Of course not, but everything it includes is. Try and apply some common
sense.

All right. So you're not going to be able to include a file that
ultimately
includes an implemention-specific file such as windows.h , and drag it in
wholesale.

Is this:
#ifndef _WINDOWS_
#define _WINDOWS_
where windows.h craps out as standard? cordially, b
[begging the question and something about Muppets snipped]
I was apprised yesterday of Dr. Feit's passing. To be a character
associated with Frank Oz is fine with me. I am not the fastest of
creatures, that is, if REAL_LIFE is OT. Those who know the representation
half of Feit-Thompson know his influence on today's programmer. bfx
Jul 6 '06 #12

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

Similar topics

71
by: Christopher Benson-Manica | last post by:
At what point was the .h dropped from the STL headers? I just had a discussion yesterday with my boss, who said he wanted .h on all the STL includes, despite me protesting that it was not...
4
by: Steven T. Hatton | last post by:
Are the Standard Headers as described in ISO/IEC 14882:2003 available in source file form as they appear in the standard? What I mean by this is, for example 20.4 describes the Header<memory> and...
8
by: zeNoTTOBESpammeDrotype | last post by:
Hi, Does the C++ standard require implementations of C++ to contain any of the "old" header files and their functionalities? (eg stdio.h, iostream.h, fstream.h) If so, which ones? Thanks,
43
by: Steven T. Hatton | last post by:
Now that I have a better grasp of the scope and capabilities of the C++ Standard Library, I understand that products such as Qt actually provide much of the same functionality through their own...
2
by: Simon Elliott | last post by:
For new C++ code which uses the C standard library, there's a new convention for includes, for example, <stdio.h> becomes <cstdio>. What happens with some of the more obscure headers such as...
31
by: Bill Cunningham | last post by:
There must be some change in the standard because I ran into this error when I put this line in a header. # pragma once I only wanted the headers to be included once. The compiler said something...
6
by: junky_fellow | last post by:
On what basis it is decided that a particular funtion should be a part of Standard C library ? Do I get these standard C libraries along with the C compiler ? Or I can use the c complier from...
6
by: Ole Nielsby | last post by:
The standard doesn't define this but what conventions do projects use? As I understand it, #include <somelibrary.h> is used for including system headers and those of frameworks such as...
24
by: Fumeur | last post by:
Is the following program standard conform? (reduced as much as possible so it still shows the problem) /* begin */ #include <stdio.h> void xfprintf(FILE *); void xfprintf(FILE *f) {...
0
by: abbasky | last post by:
### Vandf component communication method one: data sharing ​ Vandf components can achieve data exchange through data sharing, state sharing, events, and other methods. Vandf's data exchange method...
0
by: fareedcanada | last post by:
Hello I am trying to split number on their count. suppose i have 121314151617 (12cnt) then number should be split like 12,13,14,15,16,17 and if 11314151617 (11cnt) then should be split like...
0
Git
by: egorbl4 | last post by:
Скачал я git, хотел начать настройку, а там вылезло вот это Что это? Что мне с этим делать? ...
1
by: davi5007 | last post by:
Hi, Basically, I am trying to automate a field named TraceabilityNo into a web page from an access form. I've got the serial held in the variable strSearchString. How can I get this into the...
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....
0
by: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...

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.