随笔分类 - C++ 语言
摘要:0. 前言 主要是在网上找的方法都没试成功过,在各种机缘巧合下终于成功了。 这篇文章基于个人经验,而且没有走寻常路。 1. 需要的软件和插件 软件: VSCode (https://code.visualstudio.com/) LLVM (http://releases.llvm.org/down
阅读全文
摘要:#include #include #include #include #include template std::string t() { return "?"; } template std::string t() { return "s"; } template std::string t() { return "c"; } template std:...
阅读全文
摘要:这里使用 C++ 计算轨迹,生成 Python 文件,使用 matplotlib 绘图。 然后会输出 output.py 依赖的包有:numpy, matplotlib 然后直接执行 >python output.py即可 结果:
阅读全文
摘要:1.首先,编译libpq 下载源码,进入src目录,interface/libpq/win32.mak 文件中,mt命令那些行删掉。 执行 nmake /f win32.mak 在interface/libpq/Release中可以看到libpq.lib 2.服务端配置 修改postgresql.c
阅读全文
摘要:没事玩玩。 我这边的结果:MSVC(VS2015) bool : 1char : 1signed char : 1unsigned char : 1wchar_t : 2char16_t : 2char32_t : 4short : 2int : 4long : 4long long : 8floa
阅读全文
摘要:单一继承多次 代码: class great_great_father { public: great_great_father() { cout << "function: \tgreat_great_father()" << std::endl; } ~great_great_father()
阅读全文
摘要:类型别名 就是给一个类型起一个简单,容易理解的名字 typedef double num; 形式: typedef 原名 别名; 坑:这条语句后面有分号。 而且原名和别名的位置与#define刚好相反 auto 让编译器推断类型。 我个人理解:有些中间量的类型名是在是太长了,一不小心就错了,而且很难
阅读全文
摘要:起步Hello world!1 #include 2 3 int main()4 {5 std::cout<<"Hello, world!";6 return 0;7 }基本输入和输出对象cin 标准输入cout 标准输出cerr 标准错误clog 标准日志注释...
阅读全文

浙公网安备 33010602011771号