473,325 Members | 2,342 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,325 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 1869
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
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
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.