Questions tagged [errata]
18 questions
55
votes
8 answers
Array-syntax vs pointer-syntax and code generation?
In the book, "Understanding and Using C Pointers" by Richard Reese it says on page 85,
int vector[5] = {1, 2, 3, 4, 5};
The code generated by vector[i] is different from the code generated by *(vector+i) . The notation vector[i] generates machine…

Evan Carroll
- 78,363
- 46
- 261
- 468
12
votes
7 answers
Apress Pro Asp.net MVC Framework 3 - SportsStore Edit Product not working?
G’day All, has anyone purchased the ALPHA of Apress Pro Asp.net MVC Framework 3 and created the SportsStore? I can’t for the life of me edit products and have the DB update successfully? No errors are displayed and unit tests all function, but no…

MVC Newbie
- 365
- 4
- 9
4
votes
3 answers
Error spotted in C++ Primer 5th edition shared_ptr
Hi i am reading C++ primer 5th edition and i think i have spotted one error under the section shared_ptr. First i am writing the code and the explanation that they have given. Then i will write what i think is the error and what i think is actually…

Jason
- 36,170
- 5
- 26
- 60
4
votes
3 answers
For iterating though an array should we be using size_t or ptrdiff_t?
In this blog entry by Andrey Karpov entitled, "About size_t and ptrdiff_t" he shows an example,
for (ptrdiff_t i = 0; i < n; i++)
a[i] = 0;
However, I'm not sure if that's right, it seems that should be
for (size_t i = 0; i < n; i++)
a[i] =…

Evan Carroll
- 78,363
- 46
- 261
- 468
4
votes
2 answers
Errata for Java Language Specification 3rd Edition
I use JLS extensively both as a learning and teaching resource, but I've noticed that there are some errors in it.
There's the simple typos (e.g. JLS 5.1.4 "convesions"), but there's also some that I consider quite serious errors.
For example, JLS…

polygenelubricants
- 376,812
- 128
- 561
- 623
3
votes
2 answers
Is having a declaration Stack(); for the default ctor valid inside a class template
I saw this answer to a question on SO related to the declaration for a default constructor of a class template that said that the following code is not valid C++ due to CWG1435:
template class Stack {
public:
Stack(); //IS THIS…

Jason
- 36,170
- 5
- 26
- 60
3
votes
1 answer
C++ Primer 5th Edition Chapter 16.5 Class-Template Specializations
I think the book contains an error on page 711:
In § 16.2.3 (p. 684) we introduced the library remove_reference
type. That template works through a series of specializations:
// original, most general template
template struct…

Peter
- 2,240
- 3
- 23
- 37
3
votes
6 answers
Pro Javascript Design Patterns errata?
Can anyone confirm that these samples from Chapter 3 of Pro Javascript Design Patterns are flawed and, if so, how fundamentally - are they more than a typo or two away from producing the intended goal of 'class' constants in JavaScript? Thanks.
var…

Joffer
- 1,921
- 2
- 21
- 23
3
votes
2 answers
effective c# second edition errata
I am making the move from java to c#. I am reading Bill Wagner's book, Effective C# second edition. I am currently at item 6 "Understand the relationships among the many different concepts of equality" in chapter 1 where there's a sample code in…

chadk
- 33
- 2
2
votes
2 answers
Are pointer to member functions not callable object
I am reading C++ Primer 5th edition and there I came across the following statement:
As a result, unlike ordinary function pointers, a pointer to a member is not a callable object; these pointers do not support the function-call operator.
So my…

Jason
- 36,170
- 5
- 26
- 60
1
vote
0 answers
Unpredictable results in calculations under Cortex-A53
The Java code below returns unpredictable results when ran on a Cortex-A53 and specifically on Xperia XA devices.
The first iterations print the correct values:
[24, 42, 61, 45, 29, 46, 35, 36, 48, 47, 20, 64, 45, 15, 37, 70, 70,
70, 70, 70, 70,…

Petrakeas
- 1,521
- 15
- 28
1
vote
1 answer
Is "XM_CXSMICON" a misspelling of "SM_CXSMICON" in these MSDN pages?
In the three MSDN articles linked at the bottom of this post, the pre-processor macro XM_CXSMICON is mentioned. In context, it is supposed to be the index of the system metric that gives the width of a small icon in the notification tray or on the…

Xharlie
- 2,350
- 3
- 19
- 39
0
votes
1 answer
Mozilla's JavaScript issues
I'm preparing a presentation about JavaScript in different browsers.
I know that there are several issues with Mozilla. For example the constructor of the Date object will not accept the ISO date string. It will result in invalid date.
I've been…

Oybek
- 7,016
- 5
- 29
- 49
0
votes
1 answer
OrderBy Signature Error in Pro LINQ book?
According to Pro LINQ: Language Integrated Query in C# 2008, Prototype of OrderBy operator is
public static IOrderedEnumerable OrderBy(
this IEnumerable source,
Func keySelector)
where
K : IComparable
But the MSDN…

dance2die
- 35,807
- 39
- 131
- 194
0
votes
1 answer
RHEL Atomic Image on OpenShift: Installing security updates
I'm working to fix security vulnerability for our app, which is deployed on our customer's OpenShift cluster.
To be specific, we need to install these updates:
RHSA-2018:1062: kernel security, bug fix, and enhancement update…

Chakrit W
- 322
- 3
- 11