473,836 Members | 1,606 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Advantages of C++ over C - request for information

Hello.

I have to create short (1 hour) presentation about C++ advantages over
C. Are there any good articles/texts/etc. about such topic?

Personally, I'm quite proficient at C++ myself (e.g. I've read and
understood many books from H. Sutter, A. Alexandrescu etc.), so I do not
need to learn about C++ before making that presentation. I am able to
write such presentation myself, but of course - if somebody else written
similar text, I would like to use it.

Thanks in advance for any ideas, comments and pointers to articles.

--
Best regards from
Kamil Burzynski
Jul 23 '05
17 7843
Kamil Burzynski wrote:
Hello.

I have to create short (1 hour) presentation about C++ advantages over
C. Are there any good articles/texts/etc. about such topic?

Personally, I'm quite proficient at C++ myself (e.g. I've read and
understood many books from H. Sutter, A. Alexandrescu etc.), so I do not
need to learn about C++ before making that presentation. I am able to
write such presentation myself, but of course - if somebody else written
similar text, I would like to use it.

Thanks in advance for any ideas, comments and pointers to articles.

1> new /delete vs malloc?
2> inline constructors and destructors for better performance?
3> How do we acccess struct data? Using some array indexing -- so isn't
that overhead?
4> What about locality of reference in c++ isnt it much better?

You can talk about these points as well.
Jul 23 '05 #11
Kamil Burzynski wrote:
There is many C programmers, that do avoid C++ just because "it is too
bloated, C++ are bigger and slower, I can use struct instead of class and have
rougly the same functionality, etc.". I would like to show, that C++
is not necessarily overbloated, and it have many useful mechanisms, that
are improving programmers efficiency on long-term project development.


If you're trying to sell/promote/discuss C++ rationally with a bunch of
die-hard C programmers (I oughta know, I used to be one many years ago)...

Then maybe they are already thinking object-oriented, packaging data up
in structs and writing functions to work with structs. (ie. almost like
member functions) You could point out:

C++ increases type safety, particularly with new, delete, collection
classes and stream IO. This enables you to catch some errors at compile
time rather than debugger time.

C++ provides automated "plumbing" for doing what they are already doing
"by hand." If they are thinking/coding object oriented (yes you can do
that in C) then using an OO language just makes life easier.

C++ provides virtual functions, something not easily done in raw C. (yes
I know you can. But hey, I can whittle a rocking chair with nothing
more than a pocket knife too, but why would anyone want to?)

C++ gives you the STL, letting you "stand on the shoulders of giants" -
or at least not have to re-invent fundamental data structures and
algorithms.

C++ provides an exception mechanism for structured error handling.

C++ is not nearly as big and bloated as many C die-hards (and assembly
programmers) would have us believe. Can you hurt yourself (and
performance) with C++? Sure. But you can also write code that is every
bit as efficient as C. When people complain that C++ is big and
bloated, it often means that their understanding of the problem and how
best to apply OO/C++ to it is anemic.

Finally, they don't have to try to go whole-hog into C++ from day one.
They can start out simply using C++ as a better C. Then begin applying
C++ idioms as appropriate.
Jul 23 '05 #12
Phil Staite wrote:
Kamil Burzynski wrote: .... C++ is not nearly as big and bloated as many C die-hards (and assembly
programmers) would have us believe. Can you hurt yourself (and
performance) with C++? Sure. But you can also write code that is every
bit as efficient as C.
Translation: "I can write bad code in any language."
When people complain that C++ is big and bloated, it often means that their understanding of the problem and how
best to apply OO/C++ to it is anemic.

Finally, they don't have to try to go whole-hog into C++ from day one.
They can start out simply using C++ as a better C. Then begin applying
C++ idioms as appropriate.


I'm not sure this is appropriate (after having done just that)!

I would rather introduce tools like smart pointers, policy classes etc
right up front. The learning curve will be shorter (hopefully).

Jul 23 '05 #13
I hear this is the approach "Accelerate d C++" takes, though I havent'
seen this book myself. (I wish I had heard of it it 7 years or so ago
though, if it was around then.)

I'm actually "writing" (when I have the time, which is essentially
never) what will be a full-fledged book I'm going to put online that
takes this approach too.

Jul 23 '05 #14
On Mon, 07 Mar 2005 12:07:03 -0500, Victor Bazarov
<v.********@com Acast.net> wrote:
Noah Roberts wrote:
Kamil Burzynski wrote:
Hello.

I have to create short (1 hour) presentation about C++ advantages

over
C. Are there any good articles/texts/etc. about such topic?

Don't forget to mention that C++ is C with two plusses...


Why is that an advantage? Takes almost 200% longer to type...

All the things you are writing in C++ can be written in C.
Advantage of C++ is that you can do it faster, with less
errors and so on. This is starting point to all other
explanations. Otherwise you will always get answer
"I can do it in my beloved C".
Jul 23 '05 #15
On Tue, 08 Mar 2005 10:43:35 +0200,
Taras <ka*@voliacable .com> wrote
in Msg. <op************ **@campus.volia cable.com>
All the things you are writing in C++ can be written in C.
Advantage of C++ is that you can do it faster, with less
errors and so on.


Depends very much on the application though. I learned C++ when I was
faced with a problem that was so compulsively object-oriented that
learning the new language and implementing the application was a lot
faster than it would have been in C. In fact I didn't have to work very
hard because I had negotiated for a very convenient deadline (thinking I
would use C. In C++, I had the parts of the app ready long before the
respective deadlines, but released them only shortly before, thus building
up quite a reputation ;-). So I ended up getting paid quite handsomely for
learning a new language.

I still like C a lot better, aesthetically. Ever wondered why there isn't
an obfuscated C++ contest? ;-)

--Daniel
Jul 23 '05 #16
C++ is a superset of C.

I dont know why I feel that needs explination, but:

C is part of C++, C++ is C and the ++.

Why is package A and B better or worse than just package A?

Well with package A and B you get all of the stuff in package A and all of
the stuff in package B. But in package A, you don't get any B stuff.

Thats why package A and package B is better.

C++ has one major disadvantage, that is coupled with its major advantage.
Speed and size versus Power.

You can write more powerfull programs quicker with c++. And as a result, it
will be a bigger and slower programm than doing the same thing in C alone.
If you want to take the time, and I mean sometimes close to 5 times the
coding to do the same thing in C, go for it.

BUT, just becuase you are using C++ doesn't mean you can no longer put C
code in your program.
Use a healthy mixture of both to pull the Power, AND Performance out of
you're computer.
"Daniel Haude" <ha***@kir.phys net.uni-hamburg.de> wrote in message
news:slrnd2rl46 .1vc.ha***@kir. physnet.uni-hamburg.de...
On Tue, 08 Mar 2005 10:43:35 +0200,
Taras <ka*@voliacable .com> wrote
in Msg. <op************ **@campus.volia cable.com>
All the things you are writing in C++ can be written in C.
Advantage of C++ is that you can do it faster, with less
errors and so on.


Depends very much on the application though. I learned C++ when I was
faced with a problem that was so compulsively object-oriented that
learning the new language and implementing the application was a lot
faster than it would have been in C. In fact I didn't have to work very
hard because I had negotiated for a very convenient deadline (thinking I
would use C. In C++, I had the parts of the app ready long before the
respective deadlines, but released them only shortly before, thus building
up quite a reputation ;-). So I ended up getting paid quite handsomely for
learning a new language.

I still like C a lot better, aesthetically. Ever wondered why there isn't
an obfuscated C++ contest? ;-)

--Daniel

Jul 23 '05 #17
In message <TnyXd.1054$Qz. 789@okepread05> , DHOLLINGSWORTH2
<DH************ *@cox.net> writes
C++ is a superset of C.

I dont know why I feel that needs explination, but:


Because it's not true?

--
Richard Herring
Jul 23 '05 #18

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

12
7425
by: bissatch | last post by:
Hi, Generally if I re-use code, I use a function. If I need to use these functions over a number of pages I write the function to an include file where all pages have access. So when should I ever use PHP classes instead. I have learned how to put together PHP classes but never seen a reason to use them where I can simply use a function.
65
6774
by: Anthony_Barker | last post by:
I have been reading a book about the evolution of the Basic programming language. The author states that Basic - particularly Microsoft's version is full of compromises which crept in along the language's 30+ year evolution. What to you think python largest compromises are? The three that come to my mind are significant whitespace, dynamic typing, and that it is interpreted - not compiled. These three put python under fire and cause...
8
10657
by: turnit \(removethis\) | last post by:
I have a login form that uses the post method to carry the information to the next page. The form works just fine in ie6.0, but fails in mozilla and fails in ie5.2 on a mac. "HTTP/1.1 400 Bad Request" was the original error msg now that I reinstalled iislockdown and urscan I get "The parameter is incorrect." If I use the get method with this form it works just fine on everything. I can't say for certain but I think this problem started...
3
2164
by: JT | last post by:
is there a way to clear out the request.form collection, or the entire request object, for that matter?? im using server.transfer and this can be troublesome in cases where you need the request.form items to be reset. tia jt
6
3151
by: Daniel Rimmelzwaan | last post by:
I want to send a biztalk document to an aspx page, and I need to see some sample code, because I just can't make it work. I have a port with transport type HTTP, pointing to my aspx page, something like http://myserver/mypage.aspx. From there it gets blurry, because I just can't figure out how to do the rest. Does anybody have a sample page for me that I can take a look at? Just a simple one that takes whatever biztalk sends and saves it...
20
5005
by: yaron | last post by:
Hi, 1. I am familiar with .NET 1.1 and not with .NET 2.0 . if i should start a new networking project should i write it with .net 2.0 beta or write it with .net 1.1 ? 2. What are the advantages of .NET 2.0 over NET 1.1 that i should consider when writing a new infrastrcuture networking project ?
0
3845
by: Jack Wright | last post by:
Dear All, I have a web Application "http://localhost/Web/WebForm1.aspx" that calls a WebService from "http://localhost/webserviceapp/service1.asmx"...I have set the executionTimeout to 10 secs in Web.Config where my WebService is installed. <httpRuntime executionTimeout="10" appRequestQueueLimit="2" /> When I call a method "TestPlan" which takes more than 10 secs my web Page gets the following error:
1
36738
by: SenthilPSL | last post by:
When I call a webservice on IIS on Windows 2000 Server with .NET runtime 2.0, I get the following Error. System.Net.WebException: The operation has timed out From ASPX Pages, I call the web service, which in turn calls dlls for executing the sotred procedure. SP runs for about 10 mins. (It has to; because the application demands running such big SP in synchronous mode). I have set the execution timeout to 1 hour both in website (for ASPX)...
0
9825
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9671
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
10596
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10255
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9382
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7793
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6980
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
4459
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
3116
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.