私はちょうどc++の基本を学んでいて、ポインタについてのセクションに到達しました。ただし、ポインタの内容に値を割り当てようとするとエラーが発生します。任意のヒント?
#include <iostream>
class X
{
public:
int * x;
X()
{
int * x = new int;
}
};
int main (int argc, const char * argv[])
{
X test;
*(test.x) = 10;
return 0;
}