![](https://img-blog.csdnimg.cn/20201014180756922.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
C++
叹久01
这个作者很懒,什么都没留下…
展开
-
C++部署Pytorch(Libtorch)出现问题、错误汇总
原文链接转载 2021-12-06 15:51:08 · 3038 阅读 · 0 评论 -
VS2019智能感知卡顿不跟手的解决方法
点击下面链接查看方法1(和2结合)方法二转载 2021-12-02 22:13:08 · 387 阅读 · 0 评论 -
c++ 顶层const指针和底层const指针的解读技巧
**画一条穿过*位置的垂直直线如果const出现在线的左边,说明指针指向的数据为常量(底层const指针)如果const出现在线的右边,说明指针本身是常量(顶层const指针)如果const在线的两边都出现,说明两者都是常量。区分是顶层const指针还是底层const指针的方法:如果能够修改指针指向的地址则为底层const指针,如果不能修改指针指向的地址则为顶层const指针**#include <iostream>#include <cstring>using n转载 2021-05-07 15:03:52 · 264 阅读 · 0 评论 -
C++常量指针和指针常量
#include <iostream>using namespace std;int main(){ //常量指针int const *pb,从左往右读,常量 指针 pb ,表示*pb的值不能更改,可以更改Pb的所指向的地址,但地址里面的值不能变 int num_a = 1; //读从左往右读,常量 指针 P_a int const *p_a = &num_a; //底层const //*p_a = 2; //错误,指向“常量”的原创 2021-05-07 14:46:19 · 125 阅读 · 0 评论 -
extern const 的用法
问题一1.cppextern const int i; //const int i = 1;const int i = 1; //extern const int i;int main(){return 0;}2.cppextern const int i = 2;为什么这样不能通过链接,而如果按注释里的顺序就能通过链接,这个怎么解释呢?问题二在C++中,定义一个全局的符号常量。在a.cpp中定义extern const double pi=3.14;b.pp中声明extern con转载 2021-05-02 16:37:58 · 933 阅读 · 0 评论 -
C++改变指针的值和改变指针指向的对象的值
#include <iostream>using namespace std;int main(){ cout<<"开始运行了"<<endl; int a = 2, b = 3, c = 4; int *p = &a, *q = &b; cout << "初始化时*p的值-----" << *p << endl; //改变*p指针所指对象的值 //下面这一句,把a的值原创 2021-05-02 14:49:31 · 7701 阅读 · 0 评论