![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
C++Debug日记
紫菜花油菜花
这个作者很懒,什么都没留下…
展开
-
【C++Debug日记】Resolver error: Error: The VS Code Server failed to start,解决!!
今日正常启动vscode ssh准备编辑写写代码,结果无法连接到远端服务器,我用Xterm试了一下,发现远端服务器可以照常连接,故排除了服务器本身的连接问题;具体报错信息如下:[08:47:41.235] Log Level: 1[08:47:41.244] remote-ssh@0.62.0[08:47:41.244] win32 x64[08:47:41.246] SSH Resolver called for "ssh-remote+mrevowgp1.westus2.cloudapp.az原创 2021-07-22 16:23:52 · 4986 阅读 · 5 评论 -
【Debug日记】fatal: cannot lock ref ‘refs/heads/feature/CXX_Config‘: ‘refs/heads/feature‘ exists;
针对已有项目进行GitFlow管理时,容易出现如下BUG:fatal: cannot lock ref'refs/heads/feature/CXX_Config': 'refs/heads/feature' exists; cannot create 'refs/heads/feature/CXX_Config'Fatal: Could not create feature branch 'feature/CXX_Config'.意思就是:不能同时存在名称为feature的文件和目录显然原因如下:原创 2021-06-13 01:56:52 · 2633 阅读 · 0 评论 -
redefinition of default parameter
默认参数起源:函数在声明和定义时均对某个参数设置了默认值,导致redefinition.解决:默认参数仅需在声明处定义即可。原创 2020-09-15 11:31:06 · 874 阅读 · 0 评论 -
具有类型“const MyCompare”的表达式会丢失一些 const-volatile 限定符以调用“bool MyCompareoperator ()(int,int)
Error C3848:expression having type ‘const myCompare’ would lose some const-volatile qualifiers in order to call ‘bool myCompare::operator ()(int,int)’const-volatile qualifiers:常量可变限volatile影响编译器编译的结果,指volatile 变量是随时可能发生变化的,与volatile变量有关的运算,不要进行编译优化,以免原创 2020-09-14 09:47:31 · 2937 阅读 · 3 评论 -
VS链接顺序问题
VS文件排序不同导致链接顺序不同,进而产生不同的结果最近在测试不同源文件编写inline函数时,突然发现在VS上出现的特殊问题——源文件排列顺序影响着其链接顺序,进而会让程序产生不同的结果。inline 基本概念: 使用函数能够避免将相同代码重写多次的麻烦,还能减少可执行程序的体积,但也会带来程序运行时间上的开销。 函数调用在执行时,首先要在栈中为形参和局部变量分配存储空间,然后还要将实参的值复制给形参,接下来还要将函数的返回地址(该地址指明了函数执行结束后,程序应该回到哪里继续执行)放原创 2020-09-13 10:17:11 · 690 阅读 · 0 评论 -
C7510 use of dependent type name must be prefixed with ‘typename‘
Error C7510 ‘iterator’: use of dependent type name must be prefixed with ‘typename’//报错代码template <typename T>void myprint(T& v) { T::iterator it = v.begin(); //error c7510 occur for (; it != v.end(); it++) { std::cout << *it <原创 2020-09-12 17:10:56 · 488 阅读 · 0 评论 -
链接时inline导致的LNK2019错误
示例代码//test.hclass test{ public: void func(); void func1();}//test.cppvoid test::func(){ cout<<"非内联定义"<<endl;}inline void test::func1(){ cout<<"内联定义"<<endl;}//main.cppint main(){ test t; t.fu原创 2020-08-27 11:23:21 · 335 阅读 · 0 评论 -
C++ this declaration has no storage class or type specifier
C++ this declaration has no storage class or type specifier源代码//vvect.hvector<int> a = { 1,2,3,4,5 };a = { 2,3,4,5,6 }; //E0077a.push_back(); //E0077//test.hint a=1; //成功a=2; //Error E0077//Orderbook.h class Orderbook {原创 2020-08-26 09:55:50 · 2926 阅读 · 0 评论