Skip to content

Inconsistent example in Section 2.5.2 #199

Closed
@PeturOA

Description

@PeturOA

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

Activity

nathanwoohooyay

nathanwoohooyay commented on Jun 12, 2024

@nathanwoohooyay
Contributor

Working on this. Thank you for the issue @PeturOA

FlashEb

FlashEb commented on May 13, 2025

@FlashEb

@pearcej, it looks like this issue is already solved.

PeturOA

PeturOA commented on May 14, 2025

@PeturOA
Author

As far as I am concerned, yes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @pearcej@PeturOA@nathanwoohooyay@FlashEb

        Issue actions

          Inconsistent example in Section 2.5.2 · Issue #199 · pearcej/cpp4python