![](https://img-blog.csdnimg.cn/20201014180756919.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
c++
qq_42887889
这个作者很懒,什么都没留下…
展开
-
n皇后输出问题
子集数框架#include <stdio.h>#include <math.h>static int table[9][9]={0};class Queen{friend int nQueen(int);private:bool Place(int k);void Backtrack(int t);int n,*x;long sum;};bool ...原创 2019-11-01 22:34:07 · 256 阅读 · 0 评论 -
int const * pr和 int *const pr的区别
在位置上的区别是: 如果const在*的左侧,则const是用来修饰指针指向的变量,即指针指向的地址中存放的的值为常量; 如果const在*的右侧,则const是用来修饰指针本身,指针本身是常量,其指向固定。...转载 2019-04-10 20:17:10 · 191 阅读 · 0 评论 -
return *this和return this有什么区别?
正确答案为:return *this返回的是当前对象的克隆或者本身(若返回类型为A, 则是克隆, 若返回类型为A&, 则是本身 )。return this返回当前对象的地址(指向当前对象的指针), 下面我们来看看程序吧:...转载 2019-06-02 16:49:14 · 178 阅读 · 0 评论