Re: As a programmer of both languages...



Ian Collins wrote:
jacob navia wrote:
Ian Collins wrote:
jacob navia wrote:

The difference between C and C++ is the object orientation of C++. C is
not object oriented.

Are you really dense, or just being obtuse? As you have been told many
times before, C++ is a multi paradigm language. You can *choose* to
write OO or procedural code in C++.

You can't program in C++ without using classes. Even if you define
a simple structure it is actually a class.

Your ignorance continues to astound. Maybe you should take some time
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 explain
me how do you ignore classes in C++?

By not using them?


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, but
the fact is that without classes you just can't do anything at all in
C++.

If everything C does plus quite a bit more (like your beloved operator
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.

.



Relevant Pages

  • Re: Safest way to convert chars to ints
    ... > int main ... Please forgive the ignorance, but I ... I do not wish my account at HP to ... become a spam haven. ...
    (alt.comp.lang.learn.c-cpp)
  • Re: Where the code trouble is?
    ... > CBFalconer wrote: ... >> int main{ ... > Excuse my ignorance, ...
    (comp.lang.c)
  • Re: Odd pivot table type query
    ... you will have to make use of procedural code to ... SEQ_NUM int, ... declare @seq_num int ... select * from #tmp ...
    (microsoft.public.sqlserver.mseq)
  • New to threads
    ... int main{ ... the 2nd pthread_create sys. ... So basically in this example the pthread_create is relian on the ... If anyone can shed light my ignorance I would appreciate it. ...
    (comp.unix.programmer)
  • Re: Help needed for a sorting code in the literature
    ... >>To write a corresponding subprogram in C would presumably ... > You have certainly erred due to your ignorance and I can ... > int sum ... a Fortran code. ...
    (sci.crypt)