随笔分类 -  c/c++

摘要:1、函数调用约定一般规定如下三个方面: 1)函数参数的传递顺序和方式; 2)栈的维护; 3)名字修饰的策略。 2、常见的函数调用约定方式: 调用约定 出栈方式 参数传递 名字修饰 cdecl 函数调用方 从右至左的顺序压参数入栈 下划线+函数名 stdcall 函数本身 从右至左的顺序压参数入栈 下 阅读全文
posted @ 2021-01-22 21:14 名不见 阅读(188) 评论(0) 推荐(0)
摘要:1、没有虚继承,没有虚函数的情况: class VB { public: int m_a; //virtual void print() { // cout << "VB" << endl; //} }; class Base : public VB { public: int m_b1; //vi 阅读全文
posted @ 2020-11-16 11:57 名不见 阅读(200) 评论(0) 推荐(0)
摘要:https://zh.wikipedia.org/wiki/%E5%BF%AB%E9%80%9F%E6%8E%92%E5%BA%8F 递归实现: void swap(int *x, int *y) { int t = *x; *x = *y; *y = t; } void quick_sort_re 阅读全文
posted @ 2020-03-12 12:04 名不见 阅读(355) 评论(0) 推荐(0)
摘要:#include #include int main(int argc, char* argv[]) { char strSource[] = "0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x30,0x61,0x62,0x63,0x64,0x65,0x66"; char *pS = strSource; char *pCh; pCh... 阅读全文
posted @ 2018-10-15 19:48 名不见 阅读(574) 评论(0) 推荐(0)
摘要:首先,根据你当前的操作系统,还有开发工具,选择相应的mysql版本。本人选择的环境是win10 + vs2013 需要解决三个问题:1、下载安装mysql服务器,并登录mysql测试一下是否安装成功;2、搭建mysql开发环境;3、写一个简单的demo连接操作数据库,看看是否能够成功。 下面依次完成 阅读全文
posted @ 2018-07-21 21:14 名不见 阅读(631) 评论(0) 推荐(0)
只有注册用户登录后才能阅读该文。
posted @ 2016-01-04 18:10 名不见 阅读(2) 评论(0) 推荐(0)
摘要:参考自:http://taop.marchtea.com/01.03.html下面是我实现的代码,如有不妥之处,望指正,谢谢!顺便提一下:const int INT_MAX = (int)((unsigned)~0 >> 1);const int INT_MIN = -(int)((unsigned... 阅读全文
posted @ 2016-01-04 11:59 名不见 阅读(271) 评论(0) 推荐(0)
摘要:const 阅读全文
posted @ 2015-09-05 01:07 名不见 阅读(193) 评论(0) 推荐(0)
摘要:c 动态分配 结构体 二维数组 阅读全文
posted @ 2015-09-04 13:31 名不见 阅读(4081) 评论(0) 推荐(1)
摘要:c 杨辉三角 阅读全文
posted @ 2015-07-11 23:48 名不见 阅读(367) 评论(0) 推荐(0)