08 2022 档案

c++ dll 传递string参数
摘要:用c++编写了一个dll,需要传递一个路径的变量参数,刚开始想着使用string变量,但是在实践过程中string变量会成为乱码,尽量避免使用string变量传递参数,可以使用const char* str 来代替 string str 阅读全文

posted @ 2022-08-29 22:20 裹紧我的小棉袄 阅读(296) 评论(0) 推荐(0)

c++ 在项目中创建DLL,并调用
摘要:创建DLL分为两种方法,先介绍第一种 一、创建DLL (1) // dll.h #pragma once //dll.h #ifndef DLL_H_ #define DLL_H_ void printhello(); void callPython(); extern "C" _declspec( 阅读全文

posted @ 2022-08-29 14:44 裹紧我的小棉袄 阅读(471) 评论(0) 推荐(0)

vs2019 debug 出现: printf is ambiguous
摘要:在vs中写c++代码时,莫名其妙出现:printf is ambiguous 的错误。 第一步,有设置std namespace 删除后再输入 using namespace std; 第二步、删除using namespace std,再保存 第三步、添加 using namespace std; 阅读全文

posted @ 2022-08-03 17:34 裹紧我的小棉袄 阅读(731) 评论(0) 推荐(1)