![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
C | C++ | C#
LeeLeeLee钟硕
微电子中的算法人
展开
-
[C&C++]DLL生成与调用例程详解
为了避免出现问题,请统一使用Visual Studio 2017 1.DLL生成创建一个DLL库项目,在属性页中勾选生成DLL(配置类型)在输出的选择中选择Release输出主要函数和头文件如下:// DllDemo.cpp : Defines the exported functions for the DLL application.//#define Dl...原创 2018-11-03 22:10:41 · 285 阅读 · 0 评论 -
[C&C++]Visual Studio生成DLL动态链接库的注意事项
因为不是所有平台都有DLL的依赖文件所以编译的时候这样选原创 2019-04-30 09:54:27 · 397 阅读 · 0 评论 -
[C&C++]本地内存管理代码
呵呵 不会告诉你怎么用~skr~#include <stdio.h>#include <stdlib.h>#include <stdint.h>#include <string.h>// config#define mem_debug printf//#define MD_MEM_STATS//#define MD_D...原创 2019-04-26 14:28:54 · 181 阅读 · 0 评论 -
[C&C++]多线程基础编程
1.基本的阻塞型实现// multi_thread.cpp : 此文件包含 "main" 函数。程序执行将在此处开始并结束。//#include "pch.h"#include <iostream>#include <thread>#include <Windows.h>using namespace std;void thread01...原创 2019-03-02 22:55:44 · 163 阅读 · 0 评论 -
[C&C++&C#]C#调用C++编译的DLL如何获得输出数组
1.import dll2.在函数声明中,对指针传入的变量使用C#特殊分配定义定义 原定义为int * aa3.开辟全局空间4.传入aa参数5.拿到aa后转为C#的内存域6.使用nums即可...原创 2018-12-11 18:10:35 · 1027 阅读 · 0 评论 -
[C&C++]动态分配通过数组头地址偏移获得数组的长度
// ConsoleApplication1.cpp : 此文件包含 "main" 函数。程序执行将在此处开始并结束。//#include "pch.h"#include <iostream>#include <stdlib.h>int main(){ int* int_data = (int*)malloc(100 * sizeof(int)); ...原创 2018-12-07 23:30:50 · 447 阅读 · 0 评论 -
[C&C++]半精度浮点误差实验
// half_float_verify.cpp : 定义控制台应用程序的入口点。// by Zhonglihao 2018#include "stdafx.h"#include "stdlib.h"#include "stdio.h"//强制裁掉指数位的低16位unsigned short FloatToShort(float x){ unsigned short y; ...原创 2018-11-04 16:39:17 · 2241 阅读 · 0 评论 -
[C&C++]获取网卡物理地址
// get_mac.cpp : 定义控制台应用程序的入口点。//#include "stdafx.h"#include <winsock2.h>#include <Iphlpapi.h>#include <stdio.h>#pragma comment(lib, "Iphlpapi.lib")void byte2Hex(unsigned c...转载 2018-11-04 16:30:56 · 817 阅读 · 0 评论 -
[C&C++]NaN值异常处理
// NaN_Verify.cpp : 定义控制台应用程序的入口点。//#include "stdafx.h"#include "math.h"int _tmain(int argc, _TCHAR* argv[]){ float value_NaN = sqrt((float)-1); float value_Normal = sqrt((float)1); pri...原创 2018-11-04 16:19:45 · 2905 阅读 · 0 评论 -
[C&C++]C语言如何动态分配二维数组
#include <stdlib.h>int main(){ // 为二维数组分配3行 int **a = (int **)malloc(3 * sizeof(int *)); // 为每行分配5列 for(int i = 0; i < 3; i++) { a[i] = (int *)mall...原创 2019-09-25 11:42:10 · 322 阅读 · 0 评论