[TIB] Re: C Programming


[Prev][Next][Index][Thread]

[TIB] Re: C Programming




C++ is easier to program complex programs, for example event driven
programs. A good example of a event driven program is a program that uses
mouse input or has buttons such as web programs. Object orientated programs
are able to use vast numbers of subroutines that are "hidden", that is to
say they run without the programmer having to understand what they do. In
object orientated programming a programmer can tell the computer to make a
sound if a button is clicked - the programmer may not even have to write any
code for the button being pushed. The program will also be aware that the
mouse exists and what it is doing without a single line of code! The time to
write the above program could take as little as might take 10 minutes.

C is lean and mean. It will almost always be substantially faster than a C++
program. However, everything must be programmed. For the above example the C
programmer would have to program the button. They will also have to write
code to make the program aware that a mouse exists and how to handle mouse
clicks. To program the above example might take a programmer a full day. If
C++ is so much easer, why use C? When performance counts... lets say you
want to sort a large data base, C would accomplish this task perhaps 25%-50%
faster than a C++ program (C and C++ would take about the same amount of
time to program this type of application-perhaps 3-4 hours). Therefore, a
mathematically intensive program that needs optimum performance will use C
if at all possible.

C will generally require less time to make a program compatible for a
different operating system. For example our sort program may not require any
changes to work on an IBM mainframe or SI graphics workstation, but a C++
program may take 1/2 day to rewrite.

Another way of looking at C and C++ is they are basically the same thing but
they accomplish the task in a slightly different way. C is just like an old
car with a stick shift. It has a standard transmission because of low weight
and higher performances. C++ is like having an automatic transmission, it
weighs more, is not as efficient but is much easier to drive and more
importantly; safer because it does not need the drivers attention to operate
it :)

Jan Zumwalt

-----Original Message-----
From: ti-basic-bounce@lists.ticalc.org
[mailto:ti-basic-bounce@lists.ticalc.org]On Behalf Of Jeremy Butcher
Sent: Friday, November 08, 2002 5:22 PM
To: ti-basic@lists.ticalc.org
Subject: [TIB] Re: C Programming


So then let me ask this whats so good about c++ compared to C I mean
what is the advantages of learning c++??

-----Original Message-----
From: ti-basic-bounce@lists.ticalc.org
[mailto:ti-basic-bounce@lists.ticalc.org] On Behalf Of Gary Sparkes
Sent: Friday, November 08, 2002 5:47 PM
To: ti-basic@lists.ticalc.org
Subject: [TIB] Re: C Programming


c++ compilers ALWAYS work for c, c++ is backwards compatable and such
----- Original Message -----
From: <Nitrocloud@aol.com>
To: <ti-basic@lists.ticalc.org>
Sent: Friday, November 08, 2002 4:07 PM
Subject: [TIB] Re: C Programming


>
> C++ always contains C.
>
> In a message dated 11/8/2002 9:56:21 AM Eastern Standard Time,
jtkirk86@bellsouth.net writes:
>
> >
> >
> >
> > Thanks, looks good downloading now. This will work for C and C++
right?
> >
> >
> > -----Original Message-----
> > From: ti-basic-bounce@lists.ticalc.org
> > [mailto:ti-basic-bounce@lists.ticalc.org] On Behalf Of That Guy
> > Sent: Friday, November 08, 2002 9:45 AM
> > To: ti-basic@lists.ticalc.org
> > Subject: [TIB] Re: C Programming
> >
> > go to yahoo.com and look up (Dev c++) from bloodshed.  This is a
nice
> > and free compiler.
> >
> >
> > ---------------------------------
> > Do you Yahoo!?
> > U2 on LAUNCH - Exclusive medley & videos from Greatest Hits
> > CD
>





References: