这是我在Visual Studio中编写的代码:
#include <iostream>
#include <conio.h>
using namespace std;
class pointer
{
private:
int *ptr;
int **ptr1;
public:
int FindSize();
};
int pointer :: FindSize()
{
ptr1 = &ptr;
return **ptr1;
}
int main()
{
pointer point;
int size = point.FindSize();
cout << size;
getch();
return 0;
}
我收到此错误:
Pointers.exe中0x00E02BB4处的未处理异常:0xC0000005:Access 违规阅读地点0xCCCCCCCC