class cookie{
public:
cookie() = default;
int*p_member{};
int case{};
private:
};
#include <iostream>
using namespace std;
int main(){
cookie cold;
cout << "Type what you want into the cookie p_member variable " << endl;
std::cin >> cold.*p_member; // this doesn't work
}
I wanna know how to get access to the classes pointer variable put data inside it and then derefrence it.