We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
此节在于讲解 constexpr和常量表达式,对应练习最好用到。
对此节,更合适的解法是改为: const int null = 0, * p = null; // p 是 low-level const constexpr int null = 0, * p = null;// p是 top-level const
The text was updated successfully, but these errors were encountered:
加不加const似乎没关系吧,重点是不能把int变量赋给指针,改正:int null = 0, *p = &null ;
Sorry, something went wrong.
No branches or pull requests
此节在于讲解 constexpr和常量表达式,对应练习最好用到。
对此节,更合适的解法是改为:
const int null = 0, * p = null; // p 是 low-level const
constexpr int null = 0, * p = null;// p是 top-level const
The text was updated successfully, but these errors were encountered: