变量与基本类型¶
int a;
int *b = &a
int &c = b
input_line_9:2:7: error: non-const lvalue reference to type 'int' cannot bind to a value of unrelated type 'int *'
int &c = b
^ ~
Interpreter Error:
int c = b
int a = 0;
int a;
int *b = &a
int &c = b
input_line_9:2:7: error: non-const lvalue reference to type 'int' cannot bind to a value of unrelated type 'int *'
int &c = b
^ ~
Interpreter Error:
int c = b
int a = 0;