gcc compile :assignment of read-only variable ‘pTarget’
variable:变量
源代码:
int * const Results = NULL;
int i = 90;
Results = & i;
此处Results 已经被const修饰了,说明其指向的地址就不能变了,但指向地址的内容可以通过*Results来修改
gcc compile :assignment of read-only variable ‘pTarget’
variable:变量
源代码:
int * const Results = NULL;
int i = 90;
Results = & i;
此处Results 已经被const修饰了,说明其指向的地址就不能变了,但指向地址的内容可以通过*Results来修改