Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inconsistent example in Section 2.5.2 #199

Open
PeturOA opened this issue Jan 30, 2024 · 1 comment
Open

Inconsistent example in Section 2.5.2 #199

PeturOA opened this issue Jan 30, 2024 · 1 comment

Comments

@PeturOA
Copy link

PeturOA commented Jan 30, 2024

Toward the end of section 2.5.2, there is an output demonstration that has gone out of sync with the code that is doing the outputting:

If your compiler does not catch that error (the one for this class may), the first cout instruction outputs:

After changing *ptrN, varN now has: 50

This should be

varN value: 50

Actually, that doesn't seem quite right either. Pointing the pointer to memory address 100 should not affect the value of varN, right? This paragraph could probably use a little review.

The current text is a vestige of an older version that was changed here:
658b847#diff-6eb1711948c06b3d2b33b97e9c4327afe3619bf0daa3a649bbe69a6d64bb60bc
See https://github.com/pearcej/cpp4python/blame/791717a1b1f4447ef0318f050bd4c864ccb6bc20/_sources/Data_Types_and_Operators/GettingStartedwithData.rst#L355

@nathanwoohooyay
Copy link
Contributor

Working on this. Thank you for the issue @PeturOA

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants