![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
C++
文章平均质量分 50
elisa_gao
这个作者很懒,什么都没留下…
展开
-
在VS2012中C++嵌入python
1、在VC++目录中添加头文件目录:c:\Python33\include 添加库文件目录: c:\Python33\libs 右击解决方案下的项目,选择"属性",即: 2、在C:\Python33\include\pyconfig.h将python33.lib重命名为python3原创 2013-11-21 20:07:02 · 6008 阅读 · 2 评论 -
C++打开特定编码格式的文件(utf-8)
// FileEncoding.cpp : 定义控制台应用程序的入口点。//#include "stdafx.h"#include #include #include using namespace std;int _tmain(int argc, _TCHAR* argv[]){ wchar_t linex[100]; FILE * f1; //f1转载 2013-11-23 20:11:17 · 7596 阅读 · 0 评论 -
C/C++ 遍历文件夹
finddata_t的使用可参考此处文章 那么到底如何查找文件呢?我们需要一个结构体和几个大家可能不太熟悉的函数。这些函数和结构体在的头文件中,结构体为struct _finddata_t ,函数为_findfirst、_findnext和_fineclose。具体如何使用,我会慢慢讲来。 首先讲这个结构体吧。struct _finddata_t ,这个结构体是用来存转载 2013-11-23 18:51:44 · 1038 阅读 · 0 评论 -
C++ STL中Map的按Key排序和按Value排序
map是用来存放键值对的数据结构,可以很方便快速的根据key查到相应的value。假如存储学生和其成绩(假定不存在重名,当然可以对重名加以区分),我们用map来进行存储就是个不错的选择。 我们这样定义,map,其中学生姓名用string类型,作为Key;该学生的成绩用int类型,作为value。这样一来,我们可以根据学生姓名快速的查找到他的成绩。 但是,我们除了希望能够查询某转载 2013-11-23 18:54:43 · 699 阅读 · 0 评论 -
C++中编译生成dll(动态链接库)文件
主要是在函数里面的入口函数前添加extern "C" __declspec(dllexport)例如:extern "C" __declspec(dllexport) void StartLangRec()原创 2013-12-02 09:01:26 · 1734 阅读 · 0 评论 -
C# 调用C++dll string传递问题
DLL 需传入char *类型 [DllImport(“MyDLL.dll")] //传入值 public static extern int mySum (string astr1,string bstr1); //DLL中申明 extern “C” __declspec(dllexport) int WINAPI mySum(char * astr2,char * bs原创 2013-12-12 18:40:00 · 2690 阅读 · 1 评论 -
“char *”类型的实参与“LPCTSTR”类型的形参不兼容
编译器默认是Unicode字符集了。需要字符转换12原创 2014-02-19 16:47:39 · 6232 阅读 · 0 评论