An error from other projects which impress me most

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了An error from other projects which impress me most相关的知识,希望对你有一定的参考价值。

I cannot remember what the specific c++ project is, but what impressed me most is the definition of constant pointer.

If we want to define a pointer which the address content is able to change, we can‘t use char const * p, for example:

  1. char const *p;  
  2. p=str;  
  3. *p=‘n‘;  

we will get an error message:

错误: 向只读位置‘*p’赋值

 

char * const p; //define a pointer which the address is unable to change
char const * p;//define a pointer which the address content is unable to change 
const char *p; //the same as char const *p

以上是关于An error from other projects which impress me most的主要内容,如果未能解决你的问题,请参考以下文章

CoreData: error: Serious application error. An exception was caught from the delegate of NSFetchedRe

Error response from daemon: rpc error: code = AlreadyExists desc = name conflicts with an existing o

An Error from My Past Projects

An unexpected error prevented the server from fulfilling your request. (HTTP 500)

An unexpected error prevented the server from fulfilling your request. (HTTP 500)

Error: Cannot perform an interactive login from a non TTY device