Monthly Archives: January 2020

warning C4090: ‘function’: different ‘const’ qualifiers

代码如下:

错误如下:

有人已经贴了解决方案了,https://stackoverflow.com/questions/2819535/unable-to-fr[……]

Read more

Posted in tittle tattle | Leave a comment

error C2017: illegal escape sequence

用vs2017编译时一直报错:

原来是因为宏定义时转义符后面多了个空格:

这么隐蔽的问题,显然是隐患。

在.vimrc中添加高亮:
[crayon-67[……]

Read more

Posted in tittle tattle | Leave a comment

vi相关

列模式下插入:Ctrl + i

列模式下替换:选中列后按c

保存到只读文件::w !sudo tee %

删除行尾空格:用替换实现,%s/\s\+$//g

同样的思路,删除空行或者只含有空格的行:%s/^\s\*$//g

匹配printf但不匹配定制的printf(此处[……]

Read more

Posted in tittle tattle | Leave a comment

ipdb修改代码显示行数

以为ipdb能够和gdb一样用tui方式运行,结果还是有点遗憾。

补救办法是可以将默认的3行改大。

此时可以找到相应的__main__.py为/usr/local/lib/python3.6/dist-packages/ip[……]

Read more

Posted in tittle tattle | Leave a comment