Live data from Hacker News

C++ Language Quick Guide

viptechworld.blogspot.com

1–10 of 28 posts

Re: C++ Language Quick Guide

#2
Please update the section on storage classes. Auto is no longer a storage class, but a keyword for automatic type deduction. Also, register has recently been deprecated as well, if I remember correctly.

Re: C++ Language Quick Guide

#3
post #2

Please update the section on storage classes. Auto is no longer a storage class, but a keyword for automatic type deduction. Also, register has recently been deprecated as well, if I remember correctly.

This appears to be a C++03 guide, as it doesn't mention any C++11 features (no range based for). To be fair it is definitely a "quick" guide, and doesn't cover enough to actually be productive in C++ (pointers\memory allocation and references are missing...), but you're right that auto and register are the only things that appear to be explicitly wrong, instead of wrong by omission.

Re: C++ Language Quick Guide

#5
post #4

I just want to point out that Stroustrup's A Tour Of C++ is an excellent quick guide and it does include C++11 features.

I've found the C++ Standard Library 2nd Edition to be an excellent companion to Stroustrup's Tour of C++. It does a good job of preventing you from reinventing wheels that others have already built for you.

Re: C++ Language Quick Guide

#6
post #2

Please update the section on storage classes. Auto is no longer a storage class, but a keyword for automatic type deduction. Also, register has recently been deprecated as well, if I remember correctly.

This appears to be a C++03 guide, as it doesn't mention any C++11 features (no range based for). To be fair it is definitely a "quick" guide, and doesn't cover enough to actually be productive in C++ (pointers\memory allocation and references are missing...), but you're right that auto and register are the only things that appear to be explicitly wrong, instead of wrong by omission.

doesn't cover enough to actually be productive

Well probably it would be sufficient to write simple programs. But maybe this guide is just too quick in that it just covers some basic syntax but leaves out a lot of goodies which actual programs use (no containers/algorithms at all, indeed no C++11 and beyond which is imo a shame for any recent C++ guide - there's not even any mentioning of it), doesn't adhere to current best practices (take 'double getVolume(void)': void argument has no place in C++ and should arguably be const, no error checking on stream methods) and seems too lack crucial information (no mention of heder files, no mention of how to get the samples compiled).

Re: C++ Language Quick Guide

#8
> C++ is a superset of C, and that virtually any legal C program is a legal C++ program.

This is not true. One example, void* pointers are not automatically converted to "narrower" types in C++ as they are in C.

Post reply on HN