delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/10/12/09:17:54

From: Aatu Koskensilta <zaphod AT sci DOT fi>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Borland/djgpp functions
Date: Sun, 12 Oct 1997 03:46:05 -0700
Organization: Scifi Communications International, http://www.sci.fi/, helpdesk AT sci DOT fi, +358 3 2899111
Lines: 18
Message-ID: <3440AA6D.26D5@sci.fi>
References: <34383EE9 DOT 42A83CA0 AT cornell DOT edu> <19971006232801 DOT TAA28733 AT ladder01 DOT news DOT aol DOT com>
NNTP-Posting-Host: dcxxxi.dyn.sci.fi
Mime-Version: 1.0
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

> >btw, you realize this is C, not C++, right?
> 
> Actually, I had no idea.  I only have a book on C++, and the program is
> from that book.  The book is _Learn C++ Today_ by Martin Rinehart.  Why
> isn't this C++?  It compiles fine with a .cc extension.

Most C code does (actually, there is very few C programs that won't compile
as C++ program with no modifications at all), because C is a subset of C++.

However, your program uses none of the C++ specific features (such as the
standard (perhaps some day?:)) io objects cout/cin etc.) and is thus a C
program. In a sense it also is a C++ program.... I think it's more convinient
to speak of C programs when none of the C++ specific features are used...

-- 
Later,
sqrt(-1) aka Aatu Koskensilta   (squirt AT seaga DOT org)
"Coders do it with a LUT"

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019