class thing {
public:
int value1 = 5;
void display(){cout << value2 << endl;}
private:
int value2 = 77;
};
int main()
{
thing A;
cout << A.value1 << endl;
cout << A.value2 << endl;
cout << *(&A.value1 + 1) << endl;
A.display();
cin >> *(&A.value1 + 1);
A.display();
return 0;
}
Here lies the class, and i don't really understand the difference between
*(&A.value1 + 1) and *(&A.value1 + 1)