Re: As a programmer of both languages...
- From: jacob navia <jacob@xxxxxxxxxx>
- Date: Wed, 12 Dec 2007 10:50:19 +0100
Ian Collins wrote:
jacob navia wrote:Ian Collins wrote:Your ignorance continues to astound. Maybe you should take some timejacob navia wrote:You can't program in C++ without using classes. Even if you define
The difference between C and C++ is the object orientation of C++. C isAre you really dense, or just being obtuse? As you have been told many
not object oriented.
times before, C++ is a multi paradigm language. You can *choose* to
write OO or procedural code in C++.
a simple structure it is actually a class.
out and learn C++ before slagging it off.
Yes Sir!
struct A {
int age;
char *Name;
};
int main(void)
{
A jacob;
}
This is valid C++ but invalid C. In C++ each "structure" definition
is just a CLASS where all members are PUBLIC by default. I see this
explanation in all C++ books I read but in my ignorance I believe
them. Stupid isn't it?
C++ does nothing magical with structs, if a struct is valid C, it is
equally valid in C++, nothing is added. Otherwise how could we use C
libraries with C++?
Both languages are still compatible at many levels. But I am not getting
crazy, the concept of CLASS is CENTRAL to the C++ language.
Of course you can write a hello world program without them but explainBy not using them?
me how do you ignore classes in C++?
Of course. But then you are not using C++.
If you write
int main(void) { printf("hello\n");}
you do not need classes but is it C++?
Maybe, who knows what buzzword will be invented in the future, butIf everything C does plus quite a bit more (like your beloved operator
the fact is that without classes you just can't do anything at all in
C++.
overloading) amounts to nothing.....
You are just playing word games, a favorite sport in this group.
Of course you can write programs in C and compile them with C++,
modulo some differences it is possible. I would be surprised that you
can use the STL without using implicitly a class!!!
What I am saying is obvious. But you refuse to admit the obvious.
C++ is centered around the class/inheritance concept and that is OO.
.
- Follow-Ups:
- Re: As a programmer of both languages...
- From: James Kuyper
- Re: As a programmer of both languages...
- From: Ian Collins
- Re: As a programmer of both languages...
- From: Richard Heathfield
- Re: As a programmer of both languages...
- From: Ian Collins
- Re: As a programmer of both languages...
- References:
- As a programmer of both languages...
- From: Tomás Ó hÉilidhe
- Re: As a programmer of both languages...
- From: jacob navia
- Re: As a programmer of both languages...
- From: Ian Collins
- Re: As a programmer of both languages...
- From: jacob navia
- Re: As a programmer of both languages...
- From: Ian Collins
- As a programmer of both languages...
- Prev by Date: Problem with eclipse and a simple c program
- Next by Date: Re: Problem with eclipse and a simple c program
- Previous by thread: Re: As a programmer of both languages...
- Next by thread: Re: As a programmer of both languages...
- Index(es):
Relevant Pages
|