473,756 Members | 1,764 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

More Effective C++

I was thinking of buying Scott Meyer's second book (More Effective C++) and
noticed that it has not been updated since 1995 (unlike his other two famous
books). Does anyone know (rumour or otherwise) if a new edition is coming
out. I would hate to spend $50 today only to see a new edition on the
shelves tomorrow.

Apr 13 '07 #1
4 1832
On Apr 13, 10:09 am, "barcarolle r" <barcarol...@mu sic.netwrote:
I was thinking of buying Scott Meyer's second book (More Effective C++) and
noticed that it has not been updated since 1995 (unlike his other two famous
books). Does anyone know (rumour or otherwise) if a new edition is coming
out. I would hate to spend $50 today only to see a new edition on the
shelves tomorrow.
you could ask him directly

http://www.aristeia.com/books_frames.html

Apr 13 '07 #2
Some 20 years ago, it became clear that C strings were not as safe, nor
as fast, as strings in PL/I, Assembler or Pascal.

The primary reasons are that one needs to find the current length of a
string before or during a copy process - this is very time consuming.

Secondly, there is no way of determining the maximum length of a string,
and therefore when copying to a string, it is easy to over-write
adjacent storage with often disastrous consequences, including the
deliberate introduction of viruses.
Decades have passed and the C string problem continues. Buffer
over-runs are just part of the story, and the bugs that can be
introduced - the safety problem is still with us all and it has come
back to bite all of us on the lower part of our anatomy, over and over
again.

I have spent some years studying this problem and have developed some
User friendly C macros that solve the problem.

These solutions do enhance the speed and safety aspects of all "C"
programs - these benefits of speed and safety can be passed on to your
users.

The main benefits are:

* Increased speed (up to 20 times for some string handling)
* More reliability (strings cannot overwrite adjacent storage)
* Easier coding and debugging (consistent set of macros)
* Easier external variables

Here is a very short example:

dcl (op,charvar,253 ," ",ext); // Variable 'op' is defined
// as an External variable - Max length of 253 characters.
dcl (symbolic,charf ixed,8," ",ext); // Fixed length of 8

cpylit(op, "This is a 30 character string ");
cat(op,op); /* Concatenate variable op with it self. Now 60
characters */

cpy(symbolic,op ); /* Truncates it to 8 characters */

cpy(op,symbolic ); /* Copy it back. */

I invite you download the macros and code at
http://members.ozemail.com.au/~oscar.../fastsafe.html where a fuller
discussion can be found.

Clement Clarke

,-._|\ Clement V. Clarke - Author Jol, EASYPANEL, OSCAR, 370TO486
/ Oz \ Web: www.ozemail.com.au/~oscarptyltd
\_,--.x/ 38 Kings Park Road, West Perth, AUSTRALIA, 6005.
v Tel (61)-8-9324-1119, Mob 0401-054-155.
Apr 13 '07 #3
Clem Clarke wrote:
Some 20 years ago, it became clear that C strings were not as safe, nor
as fast, as strings in PL/I, Assembler or Pascal.
C++ has a solution, std::string. Did you intend to post to comp.lang.c?

--
Ian Collins.
Apr 13 '07 #4
Clem Clarke wrote:
This clown did exactly the same thing on comp.lang.c, posted his crap
in the middle of an existing thread.

Once, maybe a mistake. Twice, well it's plonking time.


Brian
Apr 13 '07 #5

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

Similar topics

303
17738
by: mike420 | last post by:
In the context of LATEX, some Pythonista asked what the big successes of Lisp were. I think there were at least three *big* successes. a. orbitz.com web site uses Lisp for algorithms, etc. b. Yahoo store was originally written in Lisp. c. Emacs The issues with these will probably come up, so I might as well mention them myself (which will also make this a more balanced
15
3530
by: Riko Wichmann | last post by:
Dear all, is there a way in Python to comment out blocks of code without putting a # in front of each line? Somethings like C's /* block of code here is commented out */ Thanks,
5
11613
by: Ross Presser | last post by:
As our customers demand that we tighten our IT security in the company, I've been asked to prepare a report quarterly showing, for each user in Active directory, what his effective permissions are for every table in every database that he has permission for on our SQL Server 2000 server. I searched a bit for a tool to do this, but all I found was the PERMISSIONS() function for showing effective permissions of the current user. Is there...
4
2425
by: cfchou | last post by:
hi, i have one question about the item 31 of Meyers' More Effective c++. in page 234, section "Using Virtual Functions Only", it says that "for example, you decide to add a new class Satellite (inheriting from GameObject) to your game, you'd have to add a new collide function to each of the existing classes in the program". how come? i assume:
116
7546
by: Mike MacSween | last post by:
S**t for brains strikes again! Why did I do that? When I met the clients and at some point they vaguely asked whether eventually would it be possible to have some people who could read the data and some who couldn't but that it wasn't important right now. And I said, 'sure, we can do that later'. So now I've developed an app without any thought to security and am trying to apply it afterwards. Doh!, doh! and triple doh!
44
3872
by: Josh Mcfarlane | last post by:
Just out of curiosity: When would using std::list be more efficient / effective than using other containers such as vector, deque, etc? As far as I'm aware, list doesn't appear to be specialized for anything. Thanks, Josh McFarlane
0
996
windows_mss
by: windows_mss | last post by:
Hi programmer's, Using Transactions in Windows application is more effective or using transaction in Web Application is More effective ? Thanks in Advance
1
1934
by: mahesh.kanakaraj | last post by:
Hi All, I have a confusion in finding the 'effective content' of a complex type definition in a XML Schema. I shall give you an example situation to clearly explain my problem. Let's have an element declaration as follows:
8
1995
by: arnuld | last post by:
Hi all, I have come to a point where I can comprehend C++ code much better. I will finish C++ Primer 4/e within next few days. Right now I am feeling the need to have have coding standards when I write programs and I feel I must apply some better ways to design my code e.g. all of my the programmers at my college use to write this code: for( int i=0; i <= 10; ++i ) {
0
9455
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
9869
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9838
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,...
1
7242
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
5140
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5302
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3805
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
2
3354
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2665
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.