Mail Archives: djgpp/1997/10/12/09:17:54
> >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 -