473,738 Members | 7,599 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

C program is standard C++ program?

I want if "a C program is a standard C++ program, but not vice versa"
is a correct statement?

In a C++ program, we can use standard C libraries. However, we cannot
use C++ libraries inside C program.

Please advise. thanks!!

Nov 15 '05
50 2082
"Mark McIntyre" <ma**********@s pamcop.net> wrote in message
news:do******** *************** *********@4ax.c om
On Mon, 24 Oct 2005 20:53:07 +1000, in comp.lang.c , "John Carson"
<jc************ ****@netspace.n et.au> wrote:
"Mark McIntyre" <ma**********@s pamcop.net> wrote in message
news:oa******** *************** *********@4ax.c om

And /I/ feel on safe grounds appealing to the authority of the many
experts in CLC, who disagree with Bjarne on this point. No
disrespect to him, but last time I heard, he was a) not impartial
in this debate and b) not a C expert.


I will grant you a) but not b). I think Stroustrup knows every last
detail about what C code is not legal C++ code.


I sincerely doubt that. There's probably no human alive who knows
*every last detail*, and I bet you a pound that Bjarne would be the
first to say that he's not The One.


They are listed in Annex C of the C++ standard. If you think they have
missed one, I am sure the C++ standards committee would be grateful to have
it drawn to their attention.

The more substantial point in the context of this discussion is that a lack
of technical expertise in C on Stroustrup's part is *not* the explanation
for any disagreement between him and others on the relationship between C
and C++.

--
John Carson

Nov 15 '05 #41
"P.J. Plauger" <pj*@dinkumware .com> wrote in message
news:lY******** ************@gi ganews.com
"John Carson" <jc************ ****@netspace.n et.au> wrote in message
news:dj******** ***@otis.netspa ce.net.au...
But its a futile debate - whether they're sub or supersets of each
other is irrelevant, they're functionalyl quite different languages
and anyone who treats either one as a subset of the other is a Bad
Programmer.


Thanks.


Just to remove any doubt...John Carson did not write the passage beginning
with "But its a futile debate..." The passage is a quote from Mark McIntyre.

--
John Carson

Nov 15 '05 #42
In article <dj***********@ otis.netspace.n et.au>,
John Carson <jc************ ****@netspace.n et.au> wrote:
"P.J. Plauger" <pj*@dinkumware .com> wrote in message
news:lY******* *************@g iganews.com
"John Carson" <jc************ ****@netspace.n et.au> wrote in message
news:dj******** ***@otis.netspa ce.net.au...
But its a futile debate - whether they're sub or supersets of each
other is irrelevant, they're functionalyl quite different languages
and anyone who treats either one as a subset of the other is a Bad
Programmer.


Thanks.


Just to remove any doubt...John Carson did not write the passage beginning
with "But its a futile debate..." The passage is a quote from Mark McIntyre.


Just to remove any doubt... Kenny McCormack did not write any of the
passages above. They are all quotes from various other people.

(Yes, John, we all understand multi-level quoting)

Nov 15 '05 #43
>>> "John Carson" <jc************ ****@netspace.n et.au> wrote in message
news:dj******** ***@otis.netspa ce.net.au...
> But its a futile debate - whether they're sub or supersets of each
> other is irrelevant, they're functionalyl quite different languages
> and anyone who treats either one as a subset of the other is a Bad
> Programmer.
"P.J. Plauger" <pj*@dinkumware .com> wrote in message
news:lY****** **************@ giganews.com
Thanks.
In article <dj***********@ otis.netspace.n et.au>,
John Carson <jc************ ****@netspace.n et.au> wrote:
Just to remove any doubt...John Carson did not write the passage beginning
with "But its a futile debate..." The passage is a quote from Mark McIntyre.

In comp.lang.c++ Kenny McCormack <ga*****@yin.in teraccess.com> wrote: Just to remove any doubt... Kenny McCormack did not write any of the
passages above. They are all quotes from various other people.

(Yes, John, we all understand multi-level quoting)


The problem is that the attribution was snipped.

--
Marcus Kwok
Nov 15 '05 #44
In article <dj**********@n ews-int.gatech.edu> ,
....
The problem is that the attribution was snipped.


There was no problem. John was just being a d*ck.
(As am I...)

Nov 15 '05 #45
"Kenny McCormack" <ga*****@yin.in teraccess.com> wrote in message
news:dj******** **@yin.interacc ess.com
In article <dj**********@n ews-int.gatech.edu> ,
...
The problem is that the attribution was snipped.


There was no problem. John was just being a d*ck.
(As am I...)


The problem was as Marcus Kwok stated: the attribution was snipped (just as
you have snipped the attribution of his statement). Multiple indentation, by
itself, does not suffice to identify the author.

I won't dignify the rest of your post with comment.

--
John Carson

Nov 15 '05 #46
On Tue, 25 Oct 2005 09:04:44 +1000, in comp.lang.c , "John Carson"
<jc************ ****@netspace.n et.au> wrote:
"Mark McIntyre" <ma**********@s pamcop.net> wrote in message
news:do******* *************** **********@4ax. com
I sincerely doubt that. There's probably no human alive who knows
*every last detail*, and I bet you a pound that Bjarne would be the
first to say that he's not The One.
They are listed in Annex C of the C++ standard.


Annex C (which is informative by the way, meaning its not part of the
Standard itself, and should not be considered as 'gospel') lists the
differences between C and C++, as of C89. Perhaps there's been a TC to
update that section, but otherwise its incorrect.

And I don't think that any unbiassed observer could read that section
and still claim that C was a subset of C++.
The more substantial point in the context of this discussion is that a lack
of technical expertise in C on Stroustrup's part is *not* the explanation
for any disagreement between him and others on the relationship between C
and C++.


If any C++ guru seriously thinks that C is substantively a subset of
C++, he's mistaken, irrespective of pedigree. A casual read through
Annex C lists a host of incompatibiliti es which are in common usage.

However given that the quote has been consistently misquoted out of
context, this is pointless discussing further. Perhaps you'd like to
take this to alt.flames?
--
Mark McIntyre
CLC FAQ <http://www.eskimo.com/~scs/C-faq/top.html>
CLC readme: <http://www.ungerhu.com/jxh/clc.welcome.txt >

----== Posted via Newsfeeds.Com - Unlimited-Uncensored-Secure Usenet News==----
http://www.newsfeeds.com The #1 Newsgroup Service in the World! 120,000+ Newsgroups
----= East and West-Coast Server Farms - Total Privacy via Encryption =----
Nov 15 '05 #47
On Wed, 26 Oct 2005 01:16:30 +1000, in comp.lang.c , "John Carson"
<jc************ ****@netspace.n et.au> wrote:
The problem was as Marcus Kwok stated: the attribution was snipped (just as
you have snipped the attribution of his statement). Multiple indentation, by
itself, does not suffice to identify the author.


I suspect nobody particularly cared, since what was written was both
correct and noncontrovertia l.

Save your ire for times when you're misattributed something offensive
or just plain wrong.

--
Mark McIntyre
CLC FAQ <http://www.eskimo.com/~scs/C-faq/top.html>
CLC readme: <http://www.ungerhu.com/jxh/clc.welcome.txt >

----== Posted via Newsfeeds.Com - Unlimited-Uncensored-Secure Usenet News==----
http://www.newsfeeds.com The #1 Newsgroup Service in the World! 120,000+ Newsgroups
----= East and West-Coast Server Farms - Total Privacy via Encryption =----
Nov 15 '05 #48
"Mark McIntyre" <ma**********@s pamcop.net> wrote in message
news:3k******** *************** *********@4ax.c om
On Wed, 26 Oct 2005 01:16:30 +1000, in comp.lang.c , "John Carson"
<jc************ ****@netspace.n et.au> wrote:
The problem was as Marcus Kwok stated: the attribution was snipped
(just as you have snipped the attribution of his statement).
Multiple indentation, by itself, does not suffice to identify the
author.
I suspect nobody particularly cared, since what was written was both
correct and noncontrovertia l.


You are within your rights to claim that

"But its a futile debate - whether they're sub or supersets of each
other is irrelevant, they're functionalyl quite different languages
and anyone who treats either one as a subset of the other is a Bad
Programmer."

is correct. It is remarkable to me that you claim it is not controversial
(unless we are to read subset to mean exact subset, which noone
has been claiming and hence has not been part of the debate, futile or
otherwise).
Save your ire for times when you're misattributed something offensive
or just plain wrong.


P.J. Plauger's response to your comment was to say "Thanks". He may have
meant it. On a second reading, I thought that his intent may have been
ironic based on another of his posts saying:

"Right, but in our case we have reason to write C code that also
*compiles* as C++ code. And for that reason, we care about the
largest common subset of the two languages."

In other words, he may have taken you (or, much worse, me) to have described
him as a Bad Programmer, hence my concern for the accuracy of the
attribution.

This will be my last reply (and I am refraining from responding to your
other post). I agree with you (though for different reasons) that this has
become pointless.

--
John Carson

Nov 15 '05 #49
On Wed, 26 Oct 2005 11:33:54 +1000, in comp.lang.c , "John Carson"
<jc************ ****@netspace.n et.au> wrote:
It is remarkable to me that you claim it is not controversial
I can't help what you find remarkable, I'm afraid...
P.J. Plauger's response to your comment was to say "Thanks". He may have
meant it. On a second reading, I thought that his intent may have been
ironic
PJ's company programs to a subset of both C *and* C++, as they need
code that compiles on both platforms.....
based on another of his posts saying:

"Right, but in our case we have reason to write C code that also
*compiles* as C++ code. And for that reason, we care about the
largest common subset of the two languages."
.... as this post makes plain. This is a different animal entirely.
In other words, he may have taken you (or, much worse, me) to have described
him as a Bad Programmer,


I very much doubt it.

--
Mark McIntyre
CLC FAQ <http://www.eskimo.com/~scs/C-faq/top.html>
CLC readme: <http://www.ungerhu.com/jxh/clc.welcome.txt >

----== Posted via Newsfeeds.Com - Unlimited-Uncensored-Secure Usenet News==----
http://www.newsfeeds.com The #1 Newsgroup Service in the World! 120,000+ Newsgroups
----= East and West-Coast Server Farms - Total Privacy via Encryption =----
Nov 15 '05 #50

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

Similar topics

13
1393
by: Pie | last post by:
I like to have my program (running on my home machine) email me (wherever I am) whenever it reaches a certain mile-stone (finishes a phase of the simulation or runs into an interesting path in the simulation). I just like add the feature so it can email me the partial results. Is there a source code for something like this I can add to my program? Do I need an SMTP server code or can I use my current SMTP ISP smtp server to email myself?...
11
2609
by: christopher diggins | last post by:
I am wondering if any can point me to any open-source library with program objects for C++ like there is in Java? I would like to be able to write things like MyProgram1 >> MyProgram2 >> Fork(MyProgram3, SomeFile); If not would this be something of interest to others? Thanks in advance,
50
2998
by: strutsng | last post by:
I want if "a C program is a standard C++ program, but not vice versa" is a correct statement? In a C++ program, we can use standard C libraries. However, we cannot use C++ libraries inside C program. Please advise. thanks!!
92
9887
by: Raghavendra R A V, CSS India | last post by:
hie.. Do any one knows how to write a C program without using the conditional statements if, for, while, do, switch, goto and even condotional statements ? It would be a great help for me if someone helps me... Urgent - Please reply soon ! Thanks, Raghu
40
2640
by: findmadhav | last post by:
I need a program in C (something like a TSR) which will automatically press the function key F6, say about every 5 seconds. Can anyone provide me with an exe of such a program? Thanks in advance.
13
2443
by: robinsonreyna | last post by:
Hi everyone Is it possible to write a program which do not have a main() function. The program should compile and run. Please give sample code to do this.
20
2618
by: Francine.Neary | last post by:
I am learning C, having fun with strings & pointers at the moment! The following program is my solution to an exercise to take an input, strip the first word, and output the rest. It works fine when you give it 2 or more words, but when there's only 1 word the results vary depending on whether it's on Windows or Linux: under MSVC it displays no output (as it should); under gcc/Linux it instead gives "Segmentation fault". Any ideas...
37
5064
by: Vince C. | last post by:
Hi all. I've installed Bloodshed Dev-C++ on a Windows 2000 SP4 machine. I'm using MinGW 3.4.2. I'd like to temporarily disable standard functions to write to stderr, i.e. for instance redirect stderr to a temporary file (or /dev/null but is there an equivalent under Windows? Is it "nul:") and then to *restore* the default stderr so that standard library functions that write to stderr produce output again.
16
3411
by: Knute Johnson | last post by:
I'm trying to write a C wrapper to run a Java program. I need to distribute a CD with the Java runtime, my application and a C startup program. I've put the C wrapper program, my java app and the runtime directories in the same directory. It will run under MS XP or maybe Vista. I'm using MS Visual C++ Express 2005 for a compiler and I tried using the _execl and _spawnl functions. These all give me assertion errors and file not found...
2
19345
Banfa
by: Banfa | last post by:
Posted by Banfa The previous tutorial discussed what programming is, what we are trying to achieve, the answer being a list of instructions constituting a valid program. Now we will discuss how we set about doing that. Every program starts with a specification, this may be a several hundred page document from your latest client or one small paragraph from your professor and pretty much anything in-between. The specification is very...
0
9473
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9334
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9259
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
8208
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
6750
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
6053
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4569
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4824
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2744
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.